Opened 4 years ago

Closed 4 years ago

#18660 closed Bug (fixed)

View on Site links get localized and break urls

Reported by: eduardocereto 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 4 years ago by eduardocereto

  • Cc eduardocereto@… added
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

comment:2 Changed 4 years ago by eduardocereto

  • Has patch set

Pull Request with possible Fix

comment:3 Changed 4 years ago by eduardocereto

  • Resolution set to invalid
  • Status changed from new to closed
  • Triage Stage changed from Unreviewed to Fixed 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 4 years ago by eduardocereto (previous) (diff)

comment:4 Changed 4 years ago by eduardocereto

I added a regression test for this bug.

comment:5 Changed 4 years ago by aaugustin

  • Resolution invalid deleted
  • Status changed from closed to reopened

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

comment:6 Changed 4 years ago by matthewwithanm

  • Triage Stage changed from Fixed on a branch to Ready for checkin

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

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

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

In c9c9a5642512155e9693bf5fa6221fd26adeccca:

Added complementary regression test for commit c1729510

Also fixed #18660.

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