Friday, January 3, 2014

StripLanguage processor in the pipeline causes error in multi-site setup

In 6.6 Update-6, the StripLanguage processor in the <preprocessRequest> pipeline was changed so that it always parsed languages from the URL, even when languageEmbedding was set to "never" in <linkManager> setting.

Sitecore implementation with multisite/multilingual setup start to cause some issues with this change if the implementation is using virtualPath and physicalPath properties in <site> definitions to define urls.

The solution for the above issue was to remove the "StripLanguage" processor from the <preprocessRequest> pipeline.

With the sitecore 6.6.0 rev 131211 (update-7) version release, sitecore has introduced a new setting in web.config to overcome the above mentioned issue.
<!--  LANGUAGES ALWAYS STRIP LANGUAGE
      This setting specifies if the StripLanguage processor in the <preprocessRequest> pipeline will parse and remove languages from
      the URL, even when the languageEmbedding attribute of the linkProvider is set to "never". You should only change this setting
      to "false" if the default behavior causes problems in your solution.
      Default value: true
-->
<setting name="Languages.AlwaysStripLanguage" value="true" /> 
"In 6.6 Update-6, the StripLanguage processor in the <preprocessRequest> pipeline was changed so that it always parsed languages from the URL, even when languageEmbedding was set to "never". This caused problems for some customers, so a new web.config setting named Languages.AlwaysStripLanguage has been introduced. You can set this setting to "false" to return to the earlier behavior. (390434)" Quote from sitecore

If the sitecore solution is using multisite/multilingual site setup and languageEmbedding is set to "never" in <linkManager> setting, then make the above setting (Languages.AlwaysStripLanguage) to "false".

1 comment:

  1. While post back happens in any of my pages, language is missing from my urls. Is this issue is because of what you mentioned above ?

    ReplyDelete