Fixing Chrome's ShowModalDialog JavaScript Error In Sitecore

When Past And Future Collide

Unfortunately, the world marches on. With Chrome 37 Google has disabled support for the showModalDialog() function. Previous to Sitecore 7.1, this function was used by Sitecore to pop-up modals inside the content editor.

showModalDialog() has been scheduled has a variety of issues. Primary concerns are security, poor user experience and browser-locking. Inside of an application there are many ways to replace it.

Looking into future, dialog boxes will be semantically declared via HTML5 <dialog /> element. <dialog /> is currently an experimental feature in Chrome. Enter *chrome://flags * to enable it.

On to the business at hand.

Fixing This Problem

Sitecore has been provided a series of version-specific packages to the address the problem.

You can find Sitecore's knowledge-base article on the issue here.

Version File
Sitecore 6.4 Sitecore.Support.416400 (6.4.0).zip
Sitecore 6.4.1 to Sitecore 6.6.0 Sitecore.Support.416400 (6.4.1-6.6.0).zip
Sitecore 7.0 Sitecore.Support.416400 (7.0).zip

Installing the appropriate Sitecore package will address this issue. Job done.

Alternatives

Of course, upgrading to Sitecore 7.1 or later will address the problem. With Sitecore's new recommend version policy, I'd always encourage keeping your instances Sitecore up to date.

If you're looking for a bad day, you can also re-enable showModalDialog settng under Enterprise Policies. Support for this "fix" will end May 2015 however. Probably for the best.

Winter Is Coming

Firefox is planning to depreciate showModalDialog as well. Microsoft introduced showModalDialog() in Internet Explorer 4 and I haven't been able to find any roadmap detailing their future support for it. That said, I'm sure once daring, now crest-fallen showModalDialog() is not long for this world.

This article was authored using Markdown for Sitecore.

Fish