Non-English OS Chrome Issue

Posted 03/26/2014 by Kenta Hoshide

We had just started our world tour of training sessions to introduce content authors and publishers to the wonderful world of Sitecore, to let their imaginations run freely on an open canvas for creative ideas and expressions. Everyone excited and ready to start the day learning what powerful tools are at their disposal, we began with a quick introduction of ourselves and everyone around in the room. There were quite a few of us in the room as it started to get a little uncomfortable from the amount of heat we were all generating just from pure excitement of what's about to come.

With the introductions out of the way, we were ready to demonstrate what Sitecore was capable of along with the new tools we had created for an even richer experience. We went through a run down of the features, what tools they will be using to get the job done, and how all of it is controlled.

By this time, everyone was nearly on the edges of their seat, quite possibly drooling on their keyboards and tablets, and it may as well looked like they were on their hands and knees begging to release them out in the open. We provided them with a training environment to get them started and to see how many things they can break in one session.

Except, there was one issue.

We had found an issue where users trying to access Sitecore using Chrome were unable to click on any buttons in Sitecore.

Uh oh...

While we had them using a different browser for the time being, we were frantically looking for the cause and a solution to fix the problem. It turns out on non-native English OSes (a full foreign culture OS and not an English OS with the language pack installed), the Date() call in JavaScript includes additional characters that causes a control to error out and stop working. There's a line of code in the /sitecore/shell/Controls/Sitecore.js file:

this.httpRequest.setRequestHeader("lastCached", new Date().toString());
which was causing this error in Chrome. This was then changed to:

this.httpRequest.setRequestHeader("lastCached", new Date().toString().split('(')[0]);

Done.

To think a simple Date().toString() was the cause of this, we just had to laugh it off.


The developers of Chrome claim this is normal behavior complying with W3C standards.


* Note: Reactions may be exaggerated a bit from actual.


Source:

Share:

Archive

Syndication