Closed Bug 101147 Opened 25 years ago Closed 4 years ago

some XUL features don't work in XML documents (i.e. when served as text/xml)

Categories

(Core :: XUL, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX
Future

People

(Reporter: Erich.Iseli, Unassigned)

References

(Depends on 1 open bug)

Details

(Keywords: meta)

Attachments

(6 files)

If a file has the extension .xml (instead of .xul), the label of the menu element won't display. The menu items pop up correctly and have the label displayed as well. When loading the page, there is a javascript error: Error: this.childNodes[i].getAttribute is not a function Source File: chrome://global/content/bindings/toolbar.xml#toolbox.init() Line: 2 This happens both if the file is a valid xul file but with the extension xml, and if the file is a valid xhtml file, with the xul namespace defined, and served as xml. Gonna attach the testcase.
this is some kind of namespace issue, it seems. I got an assertion when going to Erich's page.
Attachment #50414 - Attachment description: Save this file as menu.xul and load it locally. It will work → Served with xul mime type: works
Attachment #50416 - Attachment description: Served as text/xml → xhtml file served as text/xml: doesn't work
Adding URL to which hwaara refers.
Attachment #50417 - Attachment description: xhtml served as application/xml → xhtml served as application/xml: doesn't work
Attachment #50418 - Attachment description: xhtml served as xhtml → xhtml served as xhtml: doesn't work
Attachment #50419 - Attachment description: xul served as xml → xul served as xml: doesn't work
Ok, so it looks like this bug appears whenever the document is not served as xul file (mime type application/vnd.mozilla.xul+xml)
Keywords: testcase
Hm... not that easy. Now there's no javascript error on loading. However if you click on the toolbar-grippy, you get this new js error: Error: toolbox.collapseToolbar is not a function Source File: chrome://global/content/bindings/toolbar.xml#toolbargrippy.grippyTriggered() Line: 6
OS: Windows 98 → All
QA Contact: bsharma → moied
CCing heikki.
You are going to have problems if you try to load a XUL file with a wrong mime type. Most people know that if they serve their HTML documents as text/plain, it won't work. This is the same thing. We shouldn't crash or leak memory or do anything terminally bad if served a wrong mime type, of course, but XUL-specific things just not working is different. Use the correct mime type. Someone may argue that XUL is just XML, and another namespace, and therefore it should work. Our implementation does not think so: the mime type triggers completely different code for XUL. XUL also has an officially declared mime type, so I would really like you to use it. In my opinion this is wontfix, or perhaps future.
This bug has been marked "future" because the original netscape engineer working on this is over-burdened. If you feel this is an error, that you or another known resource will be working on this bug,or if it blocks your work in some way -- please attach your concern to the bug for reconsideration -----
Target Milestone: --- → Future
->XML
Assignee: harishd → heikki
Component: Parser → XML
QA Contact: moied → ashishbhatt
Summary: Label of xul menu element doesn't display and a javascript error occurs → XUL doesn't work when served as XML
WFM.
Because this bug is really old and no one is responding resolving WFM.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → WORKSFORME
Anne, with all my respects, but WFM is not the right resolution. Wontfix would be the more appropriate resolution, as per comment 12.
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
resolving wontfix as per comment 12.
Status: REOPENED → RESOLVED
Closed: 22 years ago → 22 years ago
Resolution: --- → WONTFIX
Erich, when I try to load a XUL file with a 'text/xml' or 'application/xml' MIME type it works fine. I think people from mozilla.org switched minds since 2001 ;-).
(In reply to comment #19) > Erich, when I try to load a XUL file with a 'text/xml' or 'application/xml' MIME > type it works fine. I think people from mozilla.org switched minds since 2001 Anne, how did you do that? Maybe my testcases are broken then? If you look at the attached testcases above, all drop-down menus indeed work, but the menu-bar has no text, except of course if it is served as a xul document. So is <xul:menu id="file-menu" label="File"> the cause of all this trouble? Is there a new way to label a menu item?
Never mind. I was just seeing the style sheets being applied and I thought no functionality was lost as well. -> VERIFIED
Status: RESOLVED → VERIFIED
> Someone may argue that XUL is just XML, and another namespace, and therefore it > should work. Our implementation does not think so: the mime type triggers > completely different code for XUL. That's not a valid reason for wontfix, and wontfixing is supposed to be done by module owners. This is not to say that fixing this bug was ever a priority, but it may still be a valid bug. I'm reopening this bug to make it easier to find and turning it into a meta bug.
Status: VERIFIED → REOPENED
Depends on: 432720
Keywords: testcase → meta
Resolution: WONTFIX → ---
Summary: XUL doesn't work when served as XML → some XUL features don't work in XML documents (i.e. when served as text/xml)
Assignee: hjtoi-bugzilla → nobody
Status: REOPENED → NEW
Component: XML → XP Toolkit/Widgets: XUL
QA Contact: ashshbhatt → xptoolkit.xul
removing URL of testcase hosted on my site because it's no longer there. The attached testcases should be enough, I guess.
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: xptoolkit.xul → xptoolkit.widgets

no longer relevant

Status: NEW → RESOLVED
Closed: 22 years ago → 4 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: