[Django] #18660: View on Site links get localized and break urls

9 views
Skip to first unread message

Django

unread,
Jul 24, 2012, 1:19:34 AM7/24/12
to django-...@googlegroups.com
#18660: View on Site links get localized and break urls
-------------------------------+--------------------------
Reporter: eduardocereto | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: 1.4
Severity: Normal | Keywords: localization
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------+--------------------------
When object ids are larger than 1000 and you have localization turned on
the "View on Site" links on the admin break because the ids get a thousand
separator and that render invalid shortcut urls.

This is a very old bug and I'm sure I reported it before. Just can't seem
to find it anymore. But I just confirmed it still happens on 1.4.

I know the fix should be simple. It's just a matter of using the template
filter unlocalize or maybe {% localize off %} around the problematic code.
But I fid this solution somehow not very elegant.

Possibly affected files:

admin/templates/admin/change_form.html
admin/templates/admin/edit_inline/stacked.html
admin/templates/admin/edit_inline/tabular.html

--
Ticket URL: <https://code.djangoproject.com/ticket/18660>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jul 24, 2012, 1:19:54 AM7/24/12
to django-...@googlegroups.com
#18660: View on Site links get localized and break urls
-------------------------------+--------------------------------------
Reporter: eduardocereto | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: 1.4
Severity: Normal | Resolution:
Keywords: localization | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by eduardocereto):

* cc: eduardocereto@… (added)
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/18660#comment:1>

Django

unread,
Jul 24, 2012, 1:47:16 AM7/24/12
to django-...@googlegroups.com
#18660: View on Site links get localized and break urls
-------------------------------+--------------------------------------
Reporter: eduardocereto | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: 1.4
Severity: Normal | Resolution:
Keywords: localization | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by eduardocereto):

* has_patch: 0 => 1


Comment:

Pull Request with possible Fix

https://github.com/django/django/pull/226

--
Ticket URL: <https://code.djangoproject.com/ticket/18660#comment:2>

Django

unread,
Jul 24, 2012, 4:25:30 AM7/24/12
to django-...@googlegroups.com
#18660: View on Site links get localized and break urls
-------------------------------------+-------------------------------------
Reporter: eduardocereto | Owner: nobody
Type: Bug | Status: closed
Component: contrib.admin | Version: 1.4
Severity: Normal | Resolution: invalid
Keywords: localization | Triage Stage: Fixed on
Has patch: 1 | a branch
Needs tests: 0 | Needs documentation: 0
Easy pickings: 1 | Patch needs improvement: 0
| UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by eduardocereto):

* status: new => closed
* resolution: => invalid
* stage: Unreviewed => Fixed on a branch


Comment:

Seems like the master branch already addresses this in a different manner.
I'm not sure how it works, but it does. So this change is unnecessary
anymore. Sorry I should have tested the master branch before opening this
ticket.

--
Ticket URL: <https://code.djangoproject.com/ticket/18660#comment:3>

Django

unread,
Jul 24, 2012, 4:52:00 AM7/24/12
to django-...@googlegroups.com
#18660: View on Site links get localized and break urls
-------------------------------------+-------------------------------------
Reporter: eduardocereto | Owner: nobody
Type: Bug | Status: closed
Component: contrib.admin | Version: 1.4
Severity: Normal | Resolution: invalid
Keywords: localization | Triage Stage: Fixed on
Has patch: 1 | a branch
Needs tests: 0 | Needs documentation: 0
Easy pickings: 1 | Patch needs improvement: 0
| UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by eduardocereto):

I added a regression test for this bug.

https://github.com/django/django/pull/227

--
Ticket URL: <https://code.djangoproject.com/ticket/18660#comment:4>

Django

unread,
Aug 17, 2012, 8:44:48 AM8/17/12
to django-...@googlegroups.com
#18660: View on Site links get localized and break urls
-------------------------------------+-------------------------------------
Reporter: eduardocereto | Owner: nobody
Type: Bug | Status: reopened
Component: contrib.admin | Version: 1.4
Severity: Normal | Resolution:
Keywords: localization | Triage Stage: Fixed on
Has patch: 1 | a branch
Needs tests: 0 | Needs documentation: 0
Easy pickings: 1 | Patch needs improvement: 0
| UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by aaugustin):

* status: closed => reopened
* resolution: invalid =>


Comment:

Re-opening to consider the addition of this test case.

--
Ticket URL: <https://code.djangoproject.com/ticket/18660#comment:5>

Django

unread,
Sep 7, 2012, 11:35:56 AM9/7/12
to django-...@googlegroups.com
#18660: View on Site links get localized and break urls
-------------------------------------+-------------------------------------
Reporter: eduardocereto | Owner: nobody
Type: Bug | Status: reopened
Component: contrib.admin | Version: 1.4
Severity: Normal | Resolution:
Keywords: localization | Triage Stage: Ready for
Has patch: 1 | checkin
Needs tests: 0 | Needs documentation: 0
Easy pickings: 1 | Patch needs improvement: 0
| UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by matthewwithanm):

* stage: Fixed on a branch => Ready for checkin


Comment:

The test looks good; fails on commit 108f8dd, passes afterwards.

--
Ticket URL: <https://code.djangoproject.com/ticket/18660#comment:6>

Django

unread,
Sep 27, 2012, 9:57:57 AM9/27/12
to django-...@googlegroups.com
#18660: View on Site links get localized and break urls
-------------------------------------+-------------------------------------
Reporter: eduardocereto | Owner: nobody
Type: Bug | Status: closed
Component: contrib.admin | Version: 1.4
Severity: Normal | Resolution: fixed

Keywords: localization | Triage Stage: Ready for
Has patch: 1 | checkin
Needs tests: 0 | Needs documentation: 0
Easy pickings: 1 | Patch needs improvement: 0
| UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Claude Paroz <claude@…>):

* status: reopened => closed
* resolution: => fixed


Comment:

In [changeset:"c9c9a5642512155e9693bf5fa6221fd26adeccca"]:
{{{
#!CommitTicketReference repository=""
revision="c9c9a5642512155e9693bf5fa6221fd26adeccca"
Added complementary regression test for commit c1729510

Also fixed #18660.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/18660#comment:7>

Reply all
Reply to author
Forward
0 new messages