Opened 7 years ago

Closed 7 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: master
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


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@… 7 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 7 years ago by rlaager@…

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset

See also #11684

comment:2 Changed 7 years ago by Russell Keith-Magee

milestone: 1.2
Triage Stage: UnreviewedAccepted

comment:3 Changed 7 years ago by James Bennett

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 Changed 7 years ago by Ramiro Morales

Resolution: duplicate
Status: newclosed

I'm closing this as a duplicate of #5704

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