Closed Bug 538983 Opened 15 years ago Closed 14 years ago

ContentType application/xhtml+xml introduces errors in JS DOM access which is valid when contentType text/html is used

Categories

(Firefox :: General, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: jerven.bolleman, Unassigned)

References

()

Details

(Whiteboard: [CLOSEME 2011-1-30])

User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5 Build Identifier: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5 When using a prototype API 1.6.1 to access the dom on a XHTML document there is a difference in behavior depending on which contentType header was sent. When application/xhtml+xml is send the following errors are seen in the Error Console. Error: uncaught exception: [Exception... "Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER) [nsIDOMNSHTMLElement.innerHTML]" nsresult: "0x80004003 (NS_ERROR_INVALID_POINTER)" location: "JS frame :: http://localhost:8080/js-compr.js :: addOption :: line 1700" data: no] When changing the contentType to text/html the code works without hickups. Reproducible: Always Steps to Reproduce: 1.On the www.uniprot.org/?tab=blast 2.Click the options >> link 3.This shows an area with multiple drop down elements. 4.Reload the page using a clean cache. 5.If possible intercept the response to change the content type header to application/xhtml+xml. Otherwise set up a separate testing instance. (Willing to provide this if needed.) 6. Click on the same options >> link and observe one drop down element created with one option. 6. Check errors console to see error message. I am using FireBug 1.4.5. I am available to help and try to create a more minimal test case. When I have one I will add it to this report.
Would you please provide a page with the mime type that you saw the issue. Would you check that this issue is reproducible in Firefox's safe mode and/or a new profile. http://support.mozilla.com/en-US/kb/Basic+troubleshooting
I can not provide a page with/uri with the mime type etc... That shows the issue. The issue does appear in a clean new profile. What I can do is build a minimal server that demonstrates the capability. If there is interest in that I will spend some time this weekend on it.
On re reading the bug. I realize what is going on. There is call in the dom to innerHTML. Which is valid when in the html world. However, this should not be valid in the general xml world. The problem is that this document is XHTML as per declaration and mime-type. Which naively might be expected to have the HTML dom methods besides the ones in the XML dom (C.11. Document Object Model and XHTML or http://www.w3.org/TR/2002/REC-xhtml1-20020801/#C_11). If the call to HTML dom methods is wrong I would like to change this report into a feature request "Alert user when using HTML DOM methods in XML view".
Reporter, are you still seeing this issue with Firefox 3.6.13 or later in safe mode? If not, please close. These links can help you in your testing. http://support.mozilla.com/kb/Safe+Mode http://support.mozilla.com/kb/Managing+profiles You can also try to reproduce in Firefox 4 Beta 8 or later, there are many improvements in the new version, http://www.mozilla.com/en-US/firefox/all-beta.html
Whiteboard: [CLOSEME 2011-1-30]
No reply, INCOMPLETE. Please retest with Firefox 3.6.13 or later and a new profile (http://support.mozilla.com/kb/Managing+profiles). If you continue to see this issue with the newest firefox and a new profile, then please comment on this bug.
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.