2

I recently started encountering the following error when attempting to edit the source for content editor web parts (in page edit mode) on multiple pages in my site collection. Same error across multiple sites and pages, happens on newly created pages or previously existing pages (that worked as recently as last week).

Uncaught ReferenceError: showModalDialog is not defined (at ie55up.js:1)

MSOPGrid_doBuilder (at ie55up.js:1)

onclick (at ie55up.js:1)

Reproduction steps

  1. Create a new aspx page (in the SitePages library)
  2. Enter page edit mode
  3. Insert a content editor web part
  4. Edit the webpart by selecting the 'edit' option from the webpart control menu
  5. Click the button labeled with the ellipses (...) to attempt to use the source builder dialog

The operation fails without raising any obvious errors unless you are viewing the browser tools.

I'm using SharePoint Online, my version number is indicated as

MicrosoftSharePointTeamServices: 16.0.0.3514

Anyone seen this and have a simple fix (i.e. something I messed up somewhere?) or is this a newly introduced problem with the platform?

Screenshot of what I'm talking about: enter image description here

The button click I'm referring to is the button next to the Content Link input box in the Content Editor edit dialog (circled).

  • Have you tried using a different browser? – Amal Hashim Dec 19 '14 at 14:55
  • I've tried Chrome 38.0.2125, IE8, IE11, and whatever current Safari is with the same results – John-M Dec 19 '14 at 14:57
  • Could you post a screenshot? I can reproduce steps 1-4, but where is the ellipses button in step 5? I only see the link 'Click here to add new content'. (also using SP online version 16.0.0.3514) – hamboy Dec 23 '14 at 2:57
  • @hamboy I've added the screenshot above. Select 'edit webpart' from the dropdown menu on at the top right of the web part when the page is in edit mode. – John-M Dec 23 '14 at 3:15
5
+50

The problem is that window.showModalDialog was deprecated and was removed from Chrome (and likely WebKit, which explains Safari). It works in IE11 and Firefox, and should have no trouble in any version of IE.

Easiest workaround: just type in the box. The popup does essentially nothing in this case. It just takes the text from the popup window and puts it in the text box.

More involved: in Chrome, it's possible to enable deprecated features (https://stackoverflow.com/questions/25663053/how-can-i-make-window-showmodaldialog-work-in-chrome-37), which should make it work there. Do not know if Safari has an equivalent. I don't recommend this route, but it may be some time before Microsoft drops support and use of showModalDialog.

Much more involved: write your own version of showModalDialog (https://stackoverflow.com/questions/24400388/showmodaldialog-alternative).

  • I could have sworn I had checked IE11 and had the same problem but on further examination it seems you're right -- it works fine in FireFox and IE10/11. I know it doesn't do much in this case I was just wondering because I had been experimenting with some javascript injection on some of my pages and was curious if I had done something that borked things up... apparently not! Thanks. – John-M Dec 23 '14 at 4:01
  • Yes, it works in IE11. Come on Microsoft... it is 2017 and several iterations of SharePoint have passed... why do we still need to endure IE-only constraints. I wish your web-based products are cross-browser friendly! – Web User Oct 6 '17 at 18:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.