[Django] #25903: ModelAdmin popups wont'close

33 views
Skip to first unread message

Django

unread,
Dec 9, 2015, 1:10:46 PM12/9/15
to django-...@googlegroups.com
#25903: ModelAdmin popups wont'close
-------------------------------+------------------------------
Reporter: Cuuuurzel | Owner: nobody
Type: Uncategorized | Status: new
Component: contrib.admin | Version: 1.9
Severity: Normal | Keywords: modeladmin popup
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+------------------------------
I am referring to the popups you can use to creare a new record on-the-fly
while editing an other record.
After upgrade from Django 1.7 to 1.9 those popups aren't opening a popup
in the web browser anymore, instead, the page will change, allowing to
create a new record.
After saving, a page saying "Closing Popup" will appear, but the page
won't go back to the original one.

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

Django

unread,
Dec 9, 2015, 1:28:12 PM12/9/15
to django-...@googlegroups.com
#25903: ModelAdmin popups wont'close
----------------------------------+--------------------------------------

Reporter: Cuuuurzel | Owner: nobody
Type: Uncategorized | Status: new
Component: contrib.admin | Version: 1.9
Severity: Normal | Resolution:

Keywords: modeladmin popup | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0


Comment:

Possibly you have some cached JavaScript in your browser? Could you try
clearing your cache and also check the JavaScript console of your browser
for any errors?

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

Django

unread,
Dec 9, 2015, 1:28:39 PM12/9/15
to django-...@googlegroups.com
#25903: ModelAdmin popups won't close
----------------------------------+--------------------------------------
Reporter: Cuuuurzel | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: 1.9
Severity: Normal | Resolution:

Keywords: modeladmin popup | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

* type: Uncategorized => Bug


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

Django

unread,
Dec 9, 2015, 2:05:57 PM12/9/15
to django-...@googlegroups.com
#25903: ModelAdmin popups won't close
----------------------------------+--------------------------------------
Reporter: Cuuuurzel | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: 1.9
Severity: Normal | Resolution:

Keywords: modeladmin popup | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
----------------------------------+--------------------------------------

Comment (by Cuuuurzel):

Sorry for not doing this before.
In the "Popup Closing..." page there is a JS error.

Chrome :
Uncaught TypeError: Cannot read property 'dismissAddRelatedObjectPopup' of
null

Firefox :
TypeError: opener is null

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

Django

unread,
Dec 9, 2015, 2:23:02 PM12/9/15
to django-...@googlegroups.com
#25903: ModelAdmin popups won't close
----------------------------------+--------------------------------------
Reporter: Cuuuurzel | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: 1.9
Severity: Normal | Resolution:

Keywords: modeladmin popup | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
----------------------------------+--------------------------------------

Comment (by timgraham):

Are you using any third-party apps that might be interfering?

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

Django

unread,
Dec 9, 2015, 3:24:50 PM12/9/15
to django-...@googlegroups.com
#25903: ModelAdmin popups won't close
----------------------------------+--------------------------------------
Reporter: Cuuuurzel | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: 1.9
Severity: Normal | Resolution:

Keywords: modeladmin popup | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
----------------------------------+--------------------------------------

Comment (by Cuuuurzel):

Third Party applications are django object actions, django rest framework
and django wpadmin.
http://www.django-rest-framework.org/
https://github.com/barszczmm/django-wpadmin
https://github.com/crccheck/django-object-actions

But the likely culprit is django wpadmin, which I forked long ago, and
used with Django 1.7.
After upgrading to Django 1.9, Django WpAdmin had some issues, but I
thought I fixed everything.
If the error is not replicable by anyone, this might be the cause.

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

Django

unread,
Dec 9, 2015, 6:40:05 PM12/9/15
to django-...@googlegroups.com
#25903: ModelAdmin popups won't close
----------------------------------+--------------------------------------
Reporter: Cuuuurzel | Owner: nobody
Type: Bug | Status: closed
Component: contrib.admin | Version: 1.9
Severity: Normal | Resolution: worksforme

Keywords: modeladmin popup | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

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


Comment:

Okay, it works for me -- so I'll close this for now. If you can reproduce
without those other apps, please reopen.

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

Django

unread,
Dec 11, 2015, 8:02:47 AM12/11/15
to django-...@googlegroups.com
#25903: ModelAdmin popups won't close
----------------------------------+--------------------------------------
Reporter: Cuuuurzel | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: 1.9
Severity: Normal | Resolution:

Keywords: modeladmin popup | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

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


Comment:

Same here without those apps. Function {{{ showAdminPopup}}} is called
from {{{ change_form.html}}} template but not from {{{
change_list.html}}}. So from change_form popup is opened correctly, but in
change_list it's just a link without js events.

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

Django

unread,
Dec 11, 2015, 8:17:19 AM12/11/15
to django-...@googlegroups.com
#25903: ModelAdmin popups won't close
----------------------------------+--------------------------------------
Reporter: Cuuuurzel | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: 1.9
Severity: Normal | Resolution:

Keywords: modeladmin popup | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
----------------------------------+--------------------------------------

Comment (by timgraham):

Could you please be more specific with a sample project and/or steps to
reproduce?

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

Django

unread,
Dec 11, 2015, 10:14:09 AM12/11/15
to django-...@googlegroups.com
#25903: ModelAdmin popups won't close
----------------------------------+--------------------------------------
Reporter: Cuuuurzel | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: 1.9
Severity: Normal | Resolution:

Keywords: modeladmin popup | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

* Attachment "djadmintest.zip" added.

Django

unread,
Dec 11, 2015, 10:22:17 AM12/11/15
to django-...@googlegroups.com
#25903: ModelAdmin popups won't close
----------------------------------+--------------------------------------
Reporter: Cuuuurzel | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: 1.9
Severity: Normal | Resolution:

Keywords: modeladmin popup | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
----------------------------------+--------------------------------------

Comment (by muffinmad):

Replying to [comment:8 timgraham]:


> Could you please be more specific with a sample project and/or steps to
reproduce?

Sorry, forgot to mention that i'm using custom ModelAdmin with
list_editable field.
In attachment you can find sample project to reproduce the bug:

1. Create new Product. In the product creation form click on "Add another
category" will popup new window as expected.
2. Navigate to /admin/products/product/. Click on "Add another category"
near the product category will not open popup.

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

Django

unread,
Dec 11, 2015, 10:39:58 AM12/11/15
to django-...@googlegroups.com
#25903: "Add another" related field buttons in list_editable don't open a popup
----------------------------------+------------------------------------
Reporter: Cuuuurzel | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: 1.9
Severity: Release blocker | Resolution:
Keywords: modeladmin popup | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

* severity: Normal => Release blocker
* stage: Unreviewed => Accepted


Comment:

Thanks, bisected to 0decef337f7f00d73b380531ac22cbc843d6e806 (#24405).

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

Django

unread,
Dec 17, 2015, 6:46:14 PM12/17/15
to django-...@googlegroups.com
#25903: "Add another" related field buttons in list_editable don't open a popup
----------------------------------+------------------------------------
Reporter: Cuuuurzel | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: 1.9

Severity: Release blocker | Resolution:
Keywords: modeladmin popup | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

* cc: rm_ (added)


Comment:

Hi Riccardo, do you have time to help with this regression from your
patch? I guess we're missing test coverage for this case.

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

Django

unread,
Dec 19, 2015, 11:45:26 AM12/19/15
to django-...@googlegroups.com
#25903: "Add another" related field buttons in list_editable don't open a popup
----------------------------------+-------------------------------------
Reporter: Cuuuurzel | Owner: timgraham
Type: Bug | Status: assigned
Component: contrib.admin | Version: 1.9

Severity: Release blocker | Resolution:
Keywords: modeladmin popup | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

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


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

Django

unread,
Dec 19, 2015, 1:34:18 PM12/19/15
to django-...@googlegroups.com
#25903: "Add another" related field buttons in list_editable don't open a popup
----------------------------------+-------------------------------------
Reporter: Cuuuurzel | Owner: timgraham
Type: Bug | Status: assigned
Component: contrib.admin | Version: 1.9

Severity: Release blocker | Resolution:
Keywords: modeladmin popup | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
----------------------------------+-------------------------------------

Comment (by rm_):

Ah missed the previous email sorry. Don't have time atm to cook a patch
but from a quick look it looks like that indeed moving
django/contrib/admin/static/admin/js/related-widget-wrapper.js content
from a separatated file to change_form.html broke popup handling outside
of that template. So the change list template needs lines 90-108 from
change_form.html and
django/contrib/admin/static/admin/js/admin/RelatedObjectLookups.js
included to work. We can move that 18 lines to a separate js if we don't
want to duplicate them i suppose.

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

Django

unread,
Dec 19, 2015, 2:26:22 PM12/19/15
to django-...@googlegroups.com
#25903: "Add another" related field buttons in list_editable don't open a popup
----------------------------------+-------------------------------------
Reporter: Cuuuurzel | Owner: timgraham
Type: Bug | Status: assigned
Component: contrib.admin | Version: 1.9
Severity: Release blocker | Resolution:
Keywords: modeladmin popup | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

* has_patch: 0 => 1


Comment:

[https://github.com/django/django/pull/5842 PR] for the stable/1.9.x
branch (will do a separate one for master since it's not a clean
forwardport).

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

Django

unread,
Dec 19, 2015, 4:09:23 PM12/19/15
to django-...@googlegroups.com
#25903: "Add another" related field buttons in list_editable don't open a popup
-------------------------------------+-------------------------------------

Reporter: Cuuuurzel | Owner: timgraham
Type: Bug | Status: assigned
Component: contrib.admin | Version: 1.9
Severity: Release blocker | Resolution:
Keywords: modeladmin popup | 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 charettes):

* stage: Accepted => Ready for checkin


Comment:

Submited patch against 1.9 looks good to me.

I didn't even know this button showed up in an editable changelist and
could have broken it myself when I refactored this part of the admin to
add edit/delete buttons.

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

Django

unread,
Dec 21, 2015, 9:30:29 AM12/21/15
to django-...@googlegroups.com
#25903: "Add another" related field buttons in list_editable don't open a popup
-------------------------------------+-------------------------------------
Reporter: Cuuuurzel | Owner: timgraham
Type: Bug | Status: closed
Component: contrib.admin | Version: 1.9
Severity: Release blocker | Resolution: fixed

Keywords: modeladmin popup | 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: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"f18b08748abaecb171fdcbcdfdcd7e4d95d931d1" f18b087]:
{{{
#!CommitTicketReference repository=""
revision="f18b08748abaecb171fdcbcdfdcd7e4d95d931d1"
Fixed #25903 -- Fixed the admin's list_editable add/change buttons.
}}}

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

Django

unread,
Dec 21, 2015, 9:32:15 AM12/21/15
to django-...@googlegroups.com
#25903: "Add another" related field buttons in list_editable don't open a popup
-------------------------------------+-------------------------------------
Reporter: Cuuuurzel | Owner: timgraham
Type: Bug | Status: closed
Component: contrib.admin | Version: 1.9

Severity: Release blocker | Resolution: fixed
Keywords: modeladmin popup | 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:"c80d85d4ad05ee905321e410e1a3e7a49d730233" c80d85d]:
{{{
#!CommitTicketReference repository=""
revision="c80d85d4ad05ee905321e410e1a3e7a49d730233"
[1.9.x] Fixed #25903 -- Fixed the admin's list_editable add/change
buttons.

Backport of f18b08748abaecb171fdcbcdfdcd7e4d95d931d1 from master
}}}

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

Reply all
Reply to author
Forward
0 new messages