Bug Tracker

Opened 12 years ago

Closed 12 years ago

Last modified 8 years ago

#3071 closed bug (invalid)

NO_MODIFICATION_ALLOWED_ERR with XHTML mime type

Reported by: parrots Owned by:
Priority: major Milestone: 1.3
Component: plugin Version: 1.2.6
Keywords: simplemodal Cc:
Blocked by: Blocking:

Description

In safari 3.1 on Mac I get the following error: Error: NO_MODIFICATION_ALLOWED_ERR: DOM Exception 7

This occurs when using SimpleModal 1.1.1 (googling the error shows it happening with multiple plugins, though). Example of code usage can be found at http://www.nationalscholastic.org/headcount/meet/41 (although currently I've reverted the mime type to text to prevent this error)

This only started to happen once I changed the mime type for my pages to application/xhtml+xml. It seems to be caused by "div.innerHTML=wrap[1]+elem+wrap[2];" on line 22 (of the minified code). My assumption is that it doesn't like using innerHTML.

Change History (4)

comment:1 Changed 12 years ago by parrots

A bit more playing around and it seems the error is caused by Safari trying to validate the innerHTML content (which makes sense since the page is being sent as XML and that should be valid). SimpleModal was trying to set the innerHTML to "<div>" first, and then to the actual content in a second call. Setting it to "<div>" is what was failing since the closing tag was missing. Not sure where the fault lies here, JQuery or SimpleModal.

comment:2 Changed 12 years ago by emartin24

In the SimpleModal source, try changing instances of:

$('<div>')

with:

$('<div/>')

comment:3 Changed 12 years ago by flesler

Component: coreplugin
Keywords: simplemodal added
Resolution: invalid
Status: newclosed

It's logical that xml pages require correct html strings. I'll close now, please let the owner of SimpleModal know about this so it can be fixed.

comment:4 in reply to:  description Changed 9 years ago by jlafrate@…

Replying to parrots:

In safari 3.1 on Mac I get the following error: Error: NO_MODIFICATION_ALLOWED_ERR: DOM Exception 7

This occurs when using SimpleModal 1.1.1 (googling the error shows it happening with multiple plugins, though). Example of code usage can be found at http://www.nationalscholastic.org/headcount/meet/41 (although currently I've reverted the mime type to text to prevent this error)

This only started to happen once I changed the mime type for my pages to application/xhtml+xml. It seems to be caused by "div.innerHTML=wrap[1]+elem+wrap[2];" on line 22 (of the minified code). My assumption is that it doesn't like using innerHTML.

I am getting a similar error:

The following contents saved as somepage.xhtml

will throw

jquery-1.6.2.js:6111 NO_MODIFICATION_ALLOWED_ERR: DOM Exception 7: An attempt was made to modify an object where modifications are not allowed. in safari.

which is line div.innerHTML = wrap[1] + elem + wrap[2]; in the jquery-1.6.2.js

Thanks Jeff jlafrate@…

<!DOCTYPE html PUBLIC "-W3CDTD XHTML 1.0 TransitionalEN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" > <html xmlns="http://www.w3.org/1999/xhtml" xmlns:trav="http://www.aaa.com/jsf/facelets/travel" xmlns:spry="http://ns.adobe.com/spry">

<head>

<title>somepage </title> <meta name="DESCRIPTION" content="ebooks_metaDescription" /><meta content="All rights reserved." name="copyright" />

<script type="text/javascript" src="/jsincludes/jquery/jquery-1.6.2.js" language="javascript"></script>

<script type="text/javascript" src="/jsincludes/jquery/1.0b2/jquery.mobile-1.0b2.js" language="javascript"></script>

</head> <body>

</body> </html>

Note: See TracTickets for help on using tickets.