--
Ticket URL: <https://code.djangoproject.com/ticket/25903>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* 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>
* type: Uncategorized => Bug
--
Ticket URL: <https://code.djangoproject.com/ticket/25903#comment:2>
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>
Comment (by timgraham):
Are you using any third-party apps that might be interfering?
--
Ticket URL: <https://code.djangoproject.com/ticket/25903#comment:4>
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>
* 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>
* 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>
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>
* Attachment "djadmintest.zip" added.
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>
* severity: Normal => Release blocker
* stage: Unreviewed => Accepted
Comment:
Thanks, bisected to 0decef337f7f00d73b380531ac22cbc843d6e806 (#24405).
--
Ticket URL: <https://code.djangoproject.com/ticket/25903#comment:10>
* 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>
* owner: nobody => timgraham
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/25903#comment:12>
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>
* 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>
* 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>
* 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>
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>