Opened 17 years ago
Closed 13 years ago
#5704 closed Bug (fixed)
Admin popup windows won't close when using application/xhtml as default content type
Reported by: | Owned by: | Alexander Herrmann | |
---|---|---|---|
Component: | contrib.admin | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
With my projects, I like to use DEFAULT_CONTENT_TYPE = 'application/xhtml+xml' in my settings.py file. I then use an XhtmlDegrader middleware, to gracefully degrade my pages to text/html to browsers that do not support this mimetype, such as IE.
Admin works 100% with the application/xhtml mime, I haven't had any other problems with it at all, except for the following bug:
If I am filling in a new entry, and I have a dropdown for a OneToMany relationship, if I hit the '+' icon next to the dropdown, I get a popup window where I can add a new entry. This works fine right upto the point when I click 'Save'. Now what it is supposed to do is close the popup, and refresh the parent page (which is fine under text/html), but under application/xhtml+xml it produces an XML error in Firefox:
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<script type="text/javascript"> opener.dismissAddAnotherPopup(window, 2, "Foo"); </script>
To fix, wrap inside a proper <html><body></body></html>
block, and the error should go away.
Attachments (5)
Change History (18)
comment:1 by , 17 years ago
Component: | Uncategorized → Admin interface |
---|
comment:2 by , 17 years ago
Triage Stage: | Unreviewed → Accepted |
---|
by , 17 years ago
Attachment: | 5704trunk.diff added |
---|
comment:3 by , 17 years ago
Has patch: | set |
---|
comment:4 by , 15 years ago
comment:5 by , 14 years ago
Severity: | → Normal |
---|---|
Type: | → Bug |
comment:7 by , 14 years ago
Patch needs improvement: | set |
---|
5704nfa.diff fails to apply cleanly on to trunk
comment:8 by , 14 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
UI/UX: | unset |
by , 14 years ago
Attachment: | 5704-r16357.diff added |
---|
comment:10 by , 14 years ago
Patch needs improvement: | set |
---|
The HTML5 doctype is now to be used throughout the admin.
by , 14 years ago
Attachment: | 5704-r16435.diff added |
---|
comment:12 by , 13 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
patched with minimal valid xhml structure, javascript elem.nodeName happens to be lowercase