Fixing Chrome's ShowModalDialog JavaScript Error In Sitecore

When Past And Future Collide

September 23, 2014

By Dan Cruickshank

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.

Dan Headshot

Dan Cruickshank

President | 12x Sitecore MVP

Dan is the founder of Fishtank. He's a multi-time Sitecore MVP and Coveo MVP award winner. Outside of technology, he is widely considered to be a top 3 father (routinely receiving "Father of the Year" accolades from his family) and past his prime on the basketball court.