Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#19331 closed Cleanup/optimization (fixed)

Missing trailing slashes in admin template breadcrumbs cause redirects

Reported by: ppetrid@… Owned by: nobody
Component: contrib.auth Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

In the admin templates, there are some trailing slashes missing since the new admin_urlname was introduced. For example, in admin/auth/user/change_password.html, line 16:

<a href="{% url opts|admin_urlname:'changelist' %}{{ original.pk }}">..

instead of

<a href="{% url opts|admin_urlname:'changelist' %}{{ original.pk }}/">..

This causes unnecessary redirects. I have not thoroughly checked all templates to know which have this problem.

Change History (7)

comment:1 Changed 4 years ago by Claude Paroz

Triage Stage: UnreviewedAccepted
Version: 1.4master

comment:2 Changed 4 years ago by Claude Paroz

After a quick scan, I don't think there are other occurrences. Anyway, I will fix this one ASAP.

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

Resolution: fixed
Status: newclosed

In 8c21c53c8b7325afb38c94764a57d1f095c88b41:

Fixed #19331 -- Added missing trailing slash in auth admin template

Thanks ppetrid at yawd.eu for the report.

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

In e15df5b6b56235059f45628f651cdb0e91c632a3:

[1.5.x] Fixed #19331 -- Added missing trailing slash in auth admin template

Thanks ppetrid at yawd.eu for the report.
Backport of 8c21c53c8 from master.

comment:5 Changed 4 years ago by Ramiro Morales <cramm0@…>

In 8fdb28219df22245d7e50b4e8374d8567ca84f0f:

Fixed #19331 (again) use the right admin named URL.

This allows us to get the trailing slash in URLs without having to
manually assemble and hard-code them.

See also commits e9497a, a222d6, f51eab, 5a9e12.

comment:6 Changed 4 years ago by Ramiro Morales

Summary: Missing taining slashes in admin template breadcrumbs cause redirectsMissing trailing slashes in admin template breadcrumbs cause redirects

comment:7 Changed 4 years ago by Ramiro Morales <cramm0@…>

In 1220f22b88c324d84e6e0f52115d3f00fcba46b6:

[1.5.x] Fixed #19331 (again) use the right admin named URL.

This allows us to get the trailing slash in URLs without having to
manually assemble and hard-code them.

See also commits e9497a, a222d6, f51eab, 5a9e12.

Backport of 8fdb28219df22245d7e50b4e8374d8567ca84f0f from master.

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