Language of your website is overwritten in Sitecore 8.1

Posted on Leave a commentPosted in Configuration, Tip
Share On Facebook
Share On Twitter
Share On Google Plus
Share On Linkedin
Share On Pinterest
Share On Reddit
Share On Stumbleupon
Share On Youtube
Contact us

After upgrading from Sitecore 8.0 to Sitecore 8.1, the language of my website sitedefinition suddently changed to EN.

word_cloud_language

Spending some time investigating where that configuration was set from Sitecore as i in Showconfig.aspx could se that my setting was pathced, i found a configurationfile called Sitecore.DefaultLanguage.config

This file had these configurations.

<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
  <sitecore>
    <sites>
      <site name="website">
        <patch:attribute name="language">en</patch:attribute>
      </site>
      <site name="login">
        <patch:attribute name="language">en</patch:attribute>
      </site>
      <site name="shell">
        <patch:attribute name="contentLanguage">en</patch:attribute>
      </site>
    </sites>
    <settings>
      <setting name="ClientLanguage">
        <patch:attribute name="value">en</patch:attribute>
      </setting>
    </settings>
  </sitecore>
</configuration>

There are several solutions to this problem.

  • Simply delete the file or change the name to Sitecore.DefaultLanguage.config.disabled.
    • This only removes the problem until next time you upgrade your Sitecore setup
  • Write your own Config file where you set your preferred language.
    • Remember the Sitecore config loading priority.
  • Write a deployscript that disables the file
  • Or as i did, simply create a Nant task that renames the file to disabled on build.

See Example.

<?xml version="1.0" encoding="utf-8"?>
<project name="DisableDefaultLanguage.build" xmlns="http://nant.sf.net/release/0.85/nant.xsd">

 <if test="${file::exists(project.web.root + '\app_config\include\Sitecore.DefaultLanguage.config')}">
    <move file="${project.web.root}\app_config\include\Sitecore.DefaultLanguage.config" tofile="${project.web.root}\app_config\include\Sitecore.DefaultLanguage.config.disabled" overwrite="true" />
  </if>

</project>

 

RichTextEditor Button Error after upgrading to Sitecore 8.1

Posted on Leave a commentPosted in Tip
Share On Facebook
Share On Twitter
Share On Google Plus
Share On Linkedin
Share On Pinterest
Share On Reddit
Share On Stumbleupon
Share On Youtube
Contact us

In Sitecore 8.0 i created a custom RichTextEditor Button to insert a Youtube Video.

2016-02-10_17-31-51

This was made with a Sitecore FormDialog Control using the RadEditor. But after upgrading to Sitecore 8.1 i got the following error.

“The Command insertyoutubevideo is not implemented yet”

My Javascript for the command looked like this.

RadEditorCommandList["insertyoutubevideo"] = function (commandName, editor, args) {
  var html = editor.getSelectionHtml();
  scEditor = editor;
  editor.showExternalDialog(
  "/sitecore/shell/default.aspx?xmlcontrol=RichText.InsertYouTubeVideo&amp;la=" + scLanguage + "&amp;selectedText=" + escape(html),
  null,
  400, //width
  400, //height
  scInsertYouTubeVideo, //callback
  null,
  "Insert YouTube",
  true, //modal
  Telerik.Web.UI.WindowBehaviors.Close, // behaviors
  false, //showStatusBar
  false //showTitleBar
  );
};

After a quick view in Sitecore’s own Rich Text Commands.js i found out that they switched from RadEditor to Telerik.

So the fix to resolve this issue was quite simple, i simply switched the Control used to execute the command, see next example.

Telerik.Web.UI.Editor.CommandList["insertyoutubevideo"] = function (commandName, editor, args) {
  var html = editor.getSelectionHtml();
  scEditor = editor;
  editor.showExternalDialog(
  "/sitecore/shell/default.aspx?xmlcontrol=RichText.InsertYouTubeVideo&amp;la=" + scLanguage + "&amp;selectedText=" + escape(html),
  null,
  400, //width
  400, //height
  scInsertYouTubeVideo, //callback
  null,
  "Insert YouTube",
  true, //modal
  Telerik.Web.UI.WindowBehaviors.Close, // behaviors
  false, //showStatusBar
  false //showTitleBar
  );
};

 

 

Welcome

Posted on 1 CommentPosted in Info
Share On Facebook
Share On Twitter
Share On Google Plus
Share On Linkedin
Share On Pinterest
Share On Reddit
Share On Stumbleupon
Share On Youtube
Contact us

This is just a short welcome to my blog.

This blog’s purpose is to support the Community with Tips & Tricks and How To’s around the Sitecore Platform.

The goal is to provide with at least 2 blogposts a month from now on. The goal is to help and inspire other developers and customers to bring the platform to an even higher level.

Enjoy 🙂