Re: [Django] #2856: Admin's Recent Actions will link to a 404 when an object has been deleted.

44 views
Skip to first unread message

Django

unread,
May 18, 2013, 9:17:57 AM5/18/13
to django-...@googlegroups.com
#2856: Admin's Recent Actions will link to a 404 when an object has been deleted.
-------------------------------+-------------------------------------
Reporter: anonymous | Owner: anonymous
Type: Bug | Status: assigned
Component: contrib.admin | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------+-------------------------------------
Changes (by anonymous):

* status: new => assigned
* owner: => anonymous


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

Django

unread,
May 18, 2013, 6:02:17 PM5/18/13
to django-...@googlegroups.com
#2856: Admin's Recent Actions will link to a 404 when an object has been deleted.
-------------------------------+------------------------------------
Reporter: anonymous | Owner: lpiatek

Type: Bug | Status: assigned
Component: contrib.admin | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------+------------------------------------
Changes (by lpiatek):

* owner: anonymous => lpiatek


--
Ticket URL: <https://code.djangoproject.com/ticket/2856#comment:14>

Django

unread,
May 19, 2013, 4:54:13 AM5/19/13
to django-...@googlegroups.com
#2856: Admin's Recent Actions will link to a 404 when an object has been deleted.
-------------------------------+------------------------------------
Reporter: anonymous | Owner: lpiatek
Type: Bug | Status: assigned
Component: contrib.admin | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------+------------------------------------

Comment (by lpiatek):

Pull request/patch for 1.6 is here
https://github.com/django/django/pull/1144

--
Ticket URL: <https://code.djangoproject.com/ticket/2856#comment:15>

Django

unread,
May 19, 2013, 4:58:29 AM5/19/13
to django-...@googlegroups.com
#2856: Admin's Recent Actions will link to a 404 when an object has been deleted.
-------------------------------------+-------------------------------------

Reporter: anonymous | Owner: lpiatek
Type: Bug | Status: assigned
Component: contrib.admin | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
Has patch: 1 | checkin
Needs tests: 0 | Needs documentation: 0
Easy pickings: 0 | Patch needs improvement: 0
| UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by viciu):

* needs_better_patch: 1 => 0
* needs_tests: 1 => 0
* stage: Accepted => Ready for checkin


Comment:

Pull request looks good, assertions provided too.

--
Ticket URL: <https://code.djangoproject.com/ticket/2856#comment:16>

Django

unread,
May 19, 2013, 5:09:22 AM5/19/13
to django-...@googlegroups.com
#2856: Admin's Recent Actions will link to a 404 when an object has been deleted.
-------------------------------+------------------------------------

Reporter: anonymous | Owner: lpiatek
Type: Bug | Status: assigned
Component: contrib.admin | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------+------------------------------------
Changes (by mjtamlyn):

* stage: Ready for checkin => Accepted


Comment:

Hmm, I don't like this approach. An alternative could be to insert an
additional redirect view which will check whether the object exists, and
if not redirect to the root of the admin with a redirect.

Another wider reaching alternative would be to generally improve 404
handling in the admin so it gives nicer messages and redirects.

--
Ticket URL: <https://code.djangoproject.com/ticket/2856#comment:17>

Django

unread,
May 31, 2013, 11:14:26 AM5/31/13
to django-...@googlegroups.com
#2856: Admin's Recent Actions will link to a 404 when an object has been deleted.
-------------------------------+------------------------------------
Reporter: anonymous | Owner: lpiatek
Type: Bug | Status: assigned
Component: contrib.admin | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
-------------------------------+------------------------------------
Changes (by timo):

* needs_better_patch: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/2856#comment:18>

Django

unread,
Nov 5, 2016, 8:02:11 AM11/5/16
to django-...@googlegroups.com
#2856: Admin's Recent Actions will link to a 404 when an object has been deleted.
-------------------------------+----------------------------------------
Reporter: anonymous | Owner: Karen Tracey

Type: Bug | Status: assigned
Component: contrib.admin | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------+----------------------------------------
Changes (by Karen Tracey):

* owner: lpiatek => Karen Tracey


--
Ticket URL: <https://code.djangoproject.com/ticket/2856#comment:19>

Django

unread,
Nov 5, 2016, 10:04:59 AM11/5/16
to django-...@googlegroups.com
#2856: Admin's Recent Actions will link to a 404 when an object has been deleted.
-------------------------------+------------------------------------
Reporter: anonymous | Owner: (none)
Type: Bug | Status: new

Component: contrib.admin | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------+------------------------------------
Changes (by Karen Tracey):

* owner: Karen Tracey => (none)
* status: assigned => new


Comment:

Tried to address Marc's concerns in new PR
https://github.com/django/django/pull/7495

--
Ticket URL: <https://code.djangoproject.com/ticket/2856#comment:20>

Django

unread,
Nov 5, 2016, 10:06:08 AM11/5/16
to django-...@googlegroups.com
#2856: Admin's Recent Actions will link to a 404 when an object has been deleted.
-------------------------------+------------------------------------
Reporter: anonymous | Owner: (none)
Type: Bug | Status: new
Component: contrib.admin | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------+------------------------------------
Changes (by Karen Tracey):

* needs_better_patch: 1 => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/2856#comment:21>

Django

unread,
Nov 5, 2016, 10:32:45 AM11/5/16
to django-...@googlegroups.com
#2856: Admin's Recent Actions will link to a 404 when an object has been deleted.
-------------------------------+------------------------------------
Reporter: anonymous | Owner: (none)
Type: Bug | Status: new
Component: contrib.admin | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+------------------------------------

Comment (by Carl Meyer):

Is this really even a bug? Seems to me that if this link is supposed to go
to the admin page for the object, and the object no longer exists, a 404
is a pretty reasonable response. Do we just need a nicer default 404 page
in the admin?

--
Ticket URL: <https://code.djangoproject.com/ticket/2856#comment:22>

Django

unread,
Nov 5, 2016, 11:40:56 AM11/5/16
to django-...@googlegroups.com
#2856: Admin's Recent Actions will link to a 404 when an object has been deleted.
-------------------------------+------------------------------------
Reporter: anonymous | Owner: (none)
Type: Bug | Status: new
Component: contrib.admin | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+------------------------------------

Comment (by Karen Tracey):

I do believe it is confusing for general users for the admin to be
offering links to pages which then 404. It was accepted 10 years ago and
seemed reasonable to me. Not all admin users are sophisticated users who
immediately jump from 404 to "oh that thing must be gone", rather they get
the impression from the "broken links" that the admin is broken/unreliable
somehow. I likely would have first gone for the "just don't make it a link
in recent actions" approach but given that had been rejected already I
tried an alternative way. Running DEBUG mode the reason for the 404 is
clear since the Http404 messages are visible then to the user, but those
are not visible when DEBUG is off, so I though making them a message the
user would see would be a small improvement. I'm not particularly willing
to tackle improving the 404 page of admin in general.

--
Ticket URL: <https://code.djangoproject.com/ticket/2856#comment:23>

Django

unread,
Dec 30, 2016, 10:33:25 AM12/30/16
to django-...@googlegroups.com
#2856: Admin's Recent Actions will link to a 404 when an object has been deleted.
-------------------------------------+-------------------------------------

Reporter: anonymous | Owner: (none)
Type: Bug | Status: new
Component: contrib.admin | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/2856#comment:24>

Django

unread,
Jan 3, 2017, 12:32:46 PM1/3/17
to django-...@googlegroups.com
#2856: Admin's Recent Actions will link to a 404 when an object has been deleted.
-------------------------------------+-------------------------------------
Reporter: anonymous | Owner: Tim
| Graham <timograham@…>
Type: Bug | Status: closed
Component: contrib.admin | Version: master
Severity: Normal | Resolution: fixed

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

* status: new => closed
* owner: (none) => Tim Graham <timograham@…>
* resolution: => fixed


Comment:

In [changeset:"27267afc4137142e4f0b36c83cec861ee6924186" 27267afc]:
{{{
#!CommitTicketReference repository=""
revision="27267afc4137142e4f0b36c83cec861ee6924186"
Fixed #2856 -- Replaced some 404s with messages in admin.

Instead of a 404, return a redirect to admin index page with a message
indicating that the requested object does not exist. This avoids the
admin returning 404 from "Recent Actions" links for deleted objects.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/2856#comment:25>

Django

unread,
Jan 4, 2017, 11:01:36 AM1/4/17
to django-...@googlegroups.com
#2856: Admin's Recent Actions will link to a 404 when an object has been deleted.
-------------------------------------+-------------------------------------
Reporter: anonymous | Owner: Tim
| Graham <timograham@…>
Type: Bug | Status: closed
Component: contrib.admin | Version: master
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"8ea541e6a297d6bcdef233871a22b5cc99a0a527" 8ea541e]:
{{{
#!CommitTicketReference repository=""
revision="8ea541e6a297d6bcdef233871a22b5cc99a0a527"
Refs #2856 -- Removed redundant escaping in admin's "Perhaps it was
deleted?" message.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/2856#comment:26>

Reply all
Reply to author
Forward
0 new messages