Opened 15 years ago

Closed 14 years ago

#11683 closed (duplicate)

response_add assumes DEFAULT_CONTENT_TYPE is text/html for dismissAddAnotherPopup

Reported by: rlaager@… Owned by: nobody
Component: contrib.admin Version: dev
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

When creating an object via a pop-up, response_add() returns a short snippet of JavaScript to call dismissAddAnotherPopup. This works if DEFAULT_CONTENT_TYPE is "text/html", but will fail if a project sets the default content-type to "application/xhtml+xml". There are two possible fixes to this problem: change the code to return a full XHTML document or set the content-type to "text/html" on this HttpResponse. The attached patch takes the latter approach.

Attachments (1)

11683-response_add-dismissAddAnotherPopup-mimetype.diff (807 bytes ) - added by rlaager@… 15 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 by rlaager@…, 15 years ago

See also #11684

comment:2 by Russell Keith-Magee, 14 years ago

milestone: 1.2
Triage Stage: UnreviewedAccepted

comment:3 by James Bennett, 14 years ago

milestone: 1.2

This is part of the larger issue of dealing with varying output formats, and so is probably best dealt with in a general fashion by a future release, rather than piecemeal in 1.2.

comment:4 by Ramiro Morales, 14 years ago

Resolution: duplicate
Status: newclosed

I'm closing this as a duplicate of #5704

Note: See TracTickets for help on using tickets.
Back to Top