[MAGNOLIA-336] JavaScript Errors Caused by IFrame Handling in adminCentral.jsp on Resin Created: 18/Apr/05  Updated: 20/Feb/15  Resolved: 25/Apr/05

Status: Closed
Project: Magnolia
Component/s: admininterface
Affects Version/s: 2.1 Final
Fix Version/s: 2.1 Final

Type: Bug Priority: Blocker
Reporter: Titus Barik Assignee: Fabrizio Giustina
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Resin 3.0.12, Fedora Core 3, Internet Explorer, Mozilla Firefox, Mozilla Browser


Attachments: File admincentral.patch    
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

The error is:

Error: divExtractNonTree has no properties
Source File: http://localhost:8080/magnolia/admintemplates/js/admincentral.jsp

In fact, the source code for the page specifically says:

<!-- a comment here is needed for the correct
rendering of the iframe tag -->

But JSP 2.0 strips all comments, and in this particular case they must be passed on to the actual HTML output. Otherwise, this error will exhibit itself in various builds of Mozilla and even in Internet Explorer depending on the web server used.

The fix is trivial. Place CDATA blocks around the text so that the comments are output to the web browser.

Patch enclosed.



 Comments   
Comment by Titus Barik [ 18/Apr/05 ]

Trivial patch.

Comment by Fabrizio Giustina [ 18/Apr/05 ]

The comment is there only to avoid the rendering of the iframe tag as an empty <iframe/> tag.
The expected result is:
<iframe></iframe>
without any comment, so the cdata should not be needed. Does Resin render the tag as <iframe/> also with this comment?

Comment by Titus Barik [ 18/Apr/05 ]

The comment is still needed in the output. Under Resin, IE and Mozilla Firefox will throw a JavaScript error and not find the divExtractNonTree div unless there is something between the <iframe></iframe> tags, i.e., <iframe><!-- empty --></iframe>. I'm not sure exactly why this is, but it must have something to do with the way Resin responds to the src= line and timing.

Comment by Fabrizio Giustina [ 25/Apr/05 ]

committed to trunk, thanks

Generated at Mon Feb 12 03:16:25 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.