Opened 8 years ago

Closed 8 years ago

#18660 closed Bug (fixed)

View on Site links get localized and break urls

Reported by: Eduardo Cereto Owned by: nobody
Component: contrib.admin Version: 1.4
Severity: Normal Keywords: localization
Cc: eduardocereto@… Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no


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:


Change History (7)

comment:1 Changed 8 years ago by Eduardo Cereto

Cc: eduardocereto@… added

comment:2 Changed 8 years ago by Eduardo Cereto

Has patch: set

Pull Request with possible Fix

comment:3 Changed 8 years ago by Eduardo Cereto

Resolution: invalid
Status: newclosed
Triage Stage: UnreviewedFixed on a branch

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.

Fixed on #18433

Last edited 8 years ago by Eduardo Cereto (previous) (diff)

comment:4 Changed 8 years ago by Eduardo Cereto

I added a regression test for this bug.

comment:5 Changed 8 years ago by Aymeric Augustin

Resolution: invalid
Status: closedreopened

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

comment:6 Changed 8 years ago by Matthew Tretter

Triage Stage: Fixed on a branchReady for checkin

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

comment:7 Changed 8 years ago by Claude Paroz <claude@…>

Resolution: fixed
Status: reopenedclosed

In c9c9a5642512155e9693bf5fa6221fd26adeccca:

Added complementary regression test for commit c1729510

Also fixed #18660.

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