Ticket #32 (closed defect: fixed)

Opened 5 years ago

Last modified 22 months ago

Language change redirect fails if original url has a query_string

Reported by: garrison Owned by: garrison
Priority: normal Milestone: 0.1
Component: Generic wiki interface Keywords:
Cc: Blocked By:
Blocking:

Description

To reproduce, visit  http://alpha.wikiotics.org/wiki/English_lesson_-_Introduction?view=view_index and change the UI's language using the box at the bottom of the screen. The redirect fails, unfortunately, returning the user to a page that does not exist because it encodes the '?'.

Thanks to Teresa Garrison for discovering this bug.

Change History

comment:1 Changed 5 years ago by garrison

  • Status changed from new to assigned

comment:2 Changed 5 years ago by garrison

  • Component changed from Data model system to Generic wiki interface

comment:3 Changed 5 years ago by garrison

Turns out, Django's request.get_full_path() is a pretty useless function. It returns everything unescaped, but if you escape what it returns, it also escapes the '?' used to mark the beginning of a query_string, if it has one. This isn't very smart, or useful.

Maybe some day I will file a bug against Django regarding this.

Until then, I am going to make DuctusCommonMiddleware? set request.escaped_full_path. This will give us easy access to precisely what we want.

comment:4 Changed 5 years ago by garrison

  • Status changed from assigned to closed
  • Resolution set to fixed

comment:5 Changed 22 months ago by garrison

This issue has now been  raised on Django's trac instance.

Note: See TracTickets for help on using tickets.