Code

Opened 5 years ago

Closed 4 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:

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

Download all attachments as: .zip

Change History (5)

comment:1 Changed 5 years ago by rlaager@…

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

See also #11684

comment:2 Changed 4 years ago by russellm

  • milestone set to 1.2
  • Triage Stage changed from Unreviewed to Accepted

comment:3 Changed 4 years ago by ubernostrum

  • milestone 1.2 deleted

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 4 years ago by ramiro

  • Resolution set to duplicate
  • Status changed from new to closed

I'm closing this as a duplicate of #5704

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.