Kyle Kingsbury A Sitecore web development blog!

Failed to synchronize segments. Message: Value cannot be null

F

Probably once or twice a week, I take a few moments to review the Sitecore Logs looking for errors that may have been introduced that could be affecting our environments. While not a new message, I finally had a few moments to investigate what appears to be a common error for Sitecore 8.2 – 170407. If you are coming here after searching google, know you aren’t doing anything wrong, this is a bug with Sitecore that has been resolved with a hotfix. To review, you can use the official reference number 141171.

The hotfix is actually relatively straight-forward, you will need a new patch configuration file to override the default domain. Below is the configuration that should resolve your issue; it is recommended to put in a App_Config\Include\zzz folder structure so it is loaded after all other configuration files.

So what causes this issue? Simple, it’s a security issue. Within the GetLanguageIndependentWorkFlowState method, the code tries to get the item representing the Segment without being wrapped with a SecurityDisabler, so the database will try to get the item as sitecore\anonymous. Since the sitecore\anonymous user does not have access to system level items, the database will return a null value and unfortunately, the null value was not anticipated by the development team and therefore will throw an exception. For reference, the SecurityDisabler causes code to run in the context of a user with administrative rights.

If you are still having trouble, you can find another potential solution on this stackexchange question.

Add comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Kyle Kingsbury A Sitecore web development blog!

Recent Posts

Tags