[Django] #22955: Admin: reloading clears filter_horizontal entries

45 views
Skip to first unread message

Django

unread,
Jul 4, 2014, 8:05:27 AM7/4/14
to django-...@googlegroups.com
#22955: Admin: reloading clears filter_horizontal entries
------------------------------+--------------------------------------------
Reporter: anonymous | Owner: nobody
Type: Bug | Status: new
Component: | Version: 1.6
contrib.admin | Keywords: admin filter_horizontal reload
Severity: Normal | Has patch: 0
Triage Stage: Unreviewed | UI/UX: 0
Easy pickings: 0 |
------------------------------+--------------------------------------------
In an admin page with a filter_horizontal, loading a page normally will
load and save the entries of a filter_horizontal properly, but if you
reload the filter_horizontal will be emptied, and if that page is saved
those entries will be lost.

Reproduced with: Django 1.4.9, 1.6.2 and 1.6.5

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

Django

unread,
Jul 4, 2014, 11:05:48 AM7/4/14
to django-...@googlegroups.com
#22955: Admin: reloading clears filter_horizontal entries
-------------------------------------+-------------------------------------

Reporter: anonymous | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: 1.6
Severity: Normal | Resolution:
Keywords: admin | Triage Stage: Accepted
filter_horizontal reload | Needs documentation: 0
Has patch: 0 | Patch needs improvement: 0
Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by timo):

* needs_better_patch: => 0
* stage: Unreviewed => Accepted
* needs_tests: => 0
* needs_docs: => 0


Comment:

I can reproduce with Firefox 30, but not Chrome 35. Which browser are you
using? Tentatively accepting, but it may be a browser bug and not
something we can/should fix in Django.

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

Django

unread,
Jul 4, 2014, 11:29:40 AM7/4/14
to django-...@googlegroups.com
#22955: Admin: reloading clears filter_horizontal entries
-------------------------------------+-------------------------------------
Reporter: anonymous | Owner: nobody
Type: Bug | Status: closed
Component: contrib.admin | Version: 1.6
Severity: Normal | Resolution: duplicate

Keywords: admin | Triage Stage: Accepted
filter_horizontal reload | Needs documentation: 0
Has patch: 0 | Patch needs improvement: 0
Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by timo):

* status: new => closed
* resolution: => duplicate


Comment:

Actually this has been reported in #13614.

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

Django

unread,
Mar 8, 2015, 8:10:51 AM3/8/15
to django-...@googlegroups.com
#22955: Admin: reloading clears filter_horizontal entries
-------------------------------------+-------------------------------------
Reporter: anonymous | Owner: nobody

Type: Bug | Status: closed
Component: contrib.admin | Version: 1.6
Severity: Normal | Resolution: duplicate
Keywords: admin | Triage Stage: Accepted
filter_horizontal reload |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by benkonrath):

I think #13614 is actually a separate issue (although it seems there has
been some discussion about this issue on #13614). The test html in comment
16 (https://code.djangoproject.com/ticket/13614#comment:16) seems to be
working on Firfox 36.

I can confirm that this is still problem on Firefox 36 with Django 1.6.10,
1.7.5, 1.8b1. How can I reopen this bug?

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

Django

unread,
Mar 8, 2015, 9:06:05 AM3/8/15
to django-...@googlegroups.com
#22955: Admin: reloading clears filter_horizontal entries
-------------------------------------+-------------------------------------

Reporter: anonymous | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: 1.6
Severity: Normal | Resolution:
Keywords: admin | Triage Stage: Accepted
filter_horizontal reload |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by benkonrath):

* status: closed => new
* resolution: duplicate =>


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

Django

unread,
Mar 8, 2015, 11:05:07 AM3/8/15
to django-...@googlegroups.com
#22955: Admin: reloading clears filter_horizontal entries
-------------------------------------+-------------------------------------

Reporter: anonymous | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: 1.6
Severity: Normal | Resolution:
Keywords: admin | Triage Stage: Accepted
filter_horizontal reload |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by benkonrath):

This pull request adds a failing test case to demonstrate the problem.

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

I'm not exactly sure what the way forward is for this issue. There seems
to be a couple tickets that have full rewrite of the select filter js
code. My primary interest is ensuring that any re-write of the select
filter js code incorporates this test so that this problem gets fixed.

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

Django

unread,
Mar 9, 2015, 11:16:37 AM3/9/15
to django-...@googlegroups.com
#22955: Admin: reloading clears filter_horizontal entries
-------------------------------------+-------------------------------------

Reporter: anonymous | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: 1.6
Severity: Normal | Resolution:
Keywords: admin | Triage Stage: Accepted
filter_horizontal reload |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by collinanderson):

* cc: cmawebsite@… (added)


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

Django

unread,
Mar 12, 2015, 12:59:06 PM3/12/15
to django-...@googlegroups.com
#22955: Admin: reloading clears filter_horizontal entries on Firefox
-------------------------------------+-------------------------------------

Reporter: anonymous | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: 1.6
Severity: Normal | Resolution:
Keywords: admin | Triage Stage: Accepted
filter_horizontal reload |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by timgraham):

I tested on Internet Explorer 9 and there's no problem there either. To
me, this still seems like an issue that would be better addressed in
Firefox itself so older versions of Django can benefit from the fix as
well.

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

Django

unread,
Dec 2, 2015, 8:01:40 AM12/2/15
to django-...@googlegroups.com
#22955: Admin: reloading clears filter_horizontal entries on Firefox
-------------------------------------+-------------------------------------
Reporter: anonymous | Owner: elky
Type: Bug | Status: assigned

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

* status: new => assigned
* owner: nobody => elky


--
Ticket URL: <https://code.djangoproject.com/ticket/22955#comment:8>

Django

unread,
Dec 2, 2015, 8:02:14 AM12/2/15
to django-...@googlegroups.com
#22955: Admin: reloading clears filter_horizontal entries on Firefox
-------------------------------------+-------------------------------------
Reporter: anonymous | Owner: elky
Type: Bug | Status: assigned
Component: contrib.admin | Version: 1.6
Severity: Normal | Resolution:
Keywords: admin | Triage Stage: Accepted
filter_horizontal reload |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by elky):

Just made pull request that fixes this problem:
https://github.com/django/django/pull/5757

--
Ticket URL: <https://code.djangoproject.com/ticket/22955#comment:9>

Django

unread,
Dec 21, 2015, 6:43:06 PM12/21/15
to django-...@googlegroups.com
#22955: Admin: reloading clears filter_horizontal entries on Firefox
-------------------------------------+-------------------------------------
Reporter: anonymous | Owner: elky
Type: Bug | Status: assigned
Component: contrib.admin | Version: 1.6
Severity: Normal | Resolution:
Keywords: admin | Triage Stage: Accepted
filter_horizontal reload |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by timgraham):

I couldn't reproduce this on master with Firefox 43.0 and bisected the
change to 4a438e400b7ce0ab9d0b6876196cbe8d620a4171. It seems plausible
this fixed the issue as the admin views are wrapped in `never_cache()`.
Can you reproduce those findings?

--
Ticket URL: <https://code.djangoproject.com/ticket/22955#comment:10>

Django

unread,
Dec 22, 2015, 3:32:41 AM12/22/15
to django-...@googlegroups.com
#22955: Admin: reloading clears filter_horizontal entries on Firefox
-------------------------------------+-------------------------------------
Reporter: anonymous | Owner: elky
Type: Bug | Status: assigned
Component: contrib.admin | Version: 1.6
Severity: Normal | Resolution:
Keywords: admin | Triage Stage: Accepted
filter_horizontal reload |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by elky):

Can't reproduce it in the latest Firefox as well. Using Django 1.9. Seems
my fix works for lower Django versions only.

--
Ticket URL: <https://code.djangoproject.com/ticket/22955#comment:11>

Django

unread,
Dec 23, 2015, 10:58:19 AM12/23/15
to django-...@googlegroups.com
#22955: Admin: reloading clears filter_horizontal entries on Firefox
-------------------------------------+-------------------------------------
Reporter: anonymous | Owner: elky
Type: Bug | Status: assigned
Component: contrib.admin | Version: 1.6
Severity: Normal | Resolution:
Keywords: admin | Triage Stage: Accepted
filter_horizontal reload |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

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

* needs_better_patch: 0 => 1
* has_patch: 0 => 1


Comment:

I think we can [https://github.com/django/django/pull/5862 backport the
fix] for #13008 for 1.8 to fix this possible data loss issue there. Let's
try to get the selenium test in your pull request working so we can add
that too. Hopefully my review comments will help.

--
Ticket URL: <https://code.djangoproject.com/ticket/22955#comment:12>

Django

unread,
Jan 6, 2016, 6:34:01 PM1/6/16
to django-...@googlegroups.com
#22955: Admin: reloading clears filter_horizontal entries on Firefox
-------------------------------------+-------------------------------------
Reporter: anonymous | Owner: elky
Type: Bug | Status: assigned
Component: contrib.admin | Version: 1.6
Severity: Normal | Resolution:
Keywords: admin | Triage Stage: Accepted
filter_horizontal reload |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by timgraham):

I backported the fix for #13008 to 1.8 in
b51086d57313e7ea857f4b96b62d25e600ee0a8d so this should be resolved there.

--
Ticket URL: <https://code.djangoproject.com/ticket/22955#comment:13>

Django

unread,
Jan 6, 2016, 6:34:23 PM1/6/16
to django-...@googlegroups.com
#22955: Admin: reloading clears filter_horizontal entries on Firefox
-------------------------------------+-------------------------------------
Reporter: anonymous | Owner: elky
Type: Bug | Status: assigned
Component: contrib.admin | Version: 1.6
Severity: Normal | Resolution:
Keywords: admin | Triage Stage: Accepted
filter_horizontal reload |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

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

In [changeset:"0cc32a8f9782f0e465b4653012de9bc41e6d7db4" 0cc32a8f]:
{{{
#!CommitTicketReference repository=""
revision="0cc32a8f9782f0e465b4653012de9bc41e6d7db4"
Refs #22955 -- Added test for admin's many-to-many widget refresh data
loss bug.

This was fixed by 4a438e400b7ce0ab9d0b6876196cbe8d620a4171.
}}}

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

Django

unread,
Jan 6, 2016, 6:34:36 PM1/6/16
to django-...@googlegroups.com
#22955: Admin: reloading clears filter_horizontal entries on Firefox
-------------------------------------+-------------------------------------
Reporter: anonymous | Owner: elky
Type: Bug | Status: closed
Component: contrib.admin | Version: 1.6
Severity: Normal | Resolution: fixed

Keywords: admin | Triage Stage: Accepted
filter_horizontal reload |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timgraham):

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


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

Reply all
Reply to author
Forward
0 new messages