DEV Community

Kenneth McAndrew
Kenneth McAndrew

Posted on

Sitecore Bug Alert: Personalization Datasources and Workflow

Recently I've been digging more into the personalization world with a client project, and I came across a bug that's now been acknowledged by Sitecore that I wanted to make the wider world aware of, in case it impacts you. Note that this will really only hit you if you use workflows with your site.

When you set up component personalization, you'll have the original version of your component, of course. In a typical workflow setup, you'll have a page-level workflow for the page, and datasource workflow for each of your datasources. When you approve the page, the datasources automatically get approved along with it. (If there's questions on setting this up, please refer to the documentation, or ask and I'd be happy to do a blog on it!)

Now, once you've created your decision table for personalization and put in a case or two, you'll switch to that case and decide how you want to tackle the situation: either copy the original component (which will create a "varX" datasource copy of the original's automatically), swap the component for another, or hide the component. In our case, we're doing the first option. So now we have a personalized variation of the component, different content and parameters, etc. And it's time to activate the personalization and approve the page and see our work, right?

Not so fast! Here's where the bug comes into play. As noted, the original datasource will get approved along with the page, but datasources connected to the personalized variations will not get approved! So you'll get all the way out there and you won't see your data acting correctly if your profile has matched the rules you set up.

Unfortunately in Pages right now, there's nothing on the page itself to tell you a datasource is or is not approved independent of the page's status; you need to go to the datasource object directly. Fortunately, if you use the right-hand bar in Pages, you can go to the two spots that can tell you the approval status - trusty old Content Editor, or new hotness the Content option in Pages. Either spot will let you approve the content through independently of the page, and then you're good to go.

I'm finding Content to be a worthy successor for Content Editor for the actual site content section, but old faithful is still good for getting into the nooks and crannies! But until this bug is fixed by Sitecore, you'll need to do a little manual workaround in these cases.

The public reference number of this bug is CFW-10138. I'll try to update when I see it's fixed. Meantime, happy Sitecore-ing!

Top comments (0)