[Django] #30502: Admin interface freezes if model has a relation named "parentNode"

9 views
Skip to first unread message

Django

unread,
May 23, 2019, 6:19:55 AM5/23/19
to django-...@googlegroups.com
#30502: Admin interface freezes if model has a relation named "parentNode"
-----------------------------------------+------------------------
Reporter: jait | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: 2.2
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------------------------------+------------------------
if you have a relation named "parentNode", the django admin page gets
stuck/unresponsive (eternal loop in js code?) when adding/editing a row
with the problematic relation.

Example model that triggers the bug:
{{{#!python
class Node(models.Model):

name = models.CharField(max_length=255)
# "parentNode" as the foreign key name causes problems with Django
admin js code =(
parentNode = models.ForeignKey('self', blank=True, null=True,
on_delete=models.CASCADE)
}}}

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

Django

unread,
May 23, 2019, 7:39:23 AM5/23/19
to django-...@googlegroups.com
#30502: Admin interface hangs on models with "parentNode" field .
-------------------------------+------------------------------------
Reporter: jait | Owner: nobody
Type: Bug | Status: closed
Component: contrib.admin | Version: master
Severity: Normal | Resolution: invalid
Keywords: | Triage Stage: Accepted

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

* status: new => closed
* type: Uncategorized => Bug
* component: Uncategorized => contrib.admin
* version: 2.2 => master
* resolution: => invalid
* stage: Unreviewed => Accepted


Comment:

Thanks for the report. I reproduced this issue but it is not related with
any of Django's JS. jQuery hangs even if `CharField` is named
`parentNode`. You can try to look for a help on jQuery support channels.
Personally, I would try to avoid using DOM properties as a field names.

Closing per TicketClosingReasons/UseSupportChannels

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

Django

unread,
Jun 20, 2019, 8:31:45 PM6/20/19
to django-...@googlegroups.com
#30502: Admin interface hangs on models with "parentNode" field .
-------------------------------+------------------------------------
Reporter: Jari Tenhunen | Owner: nobody

Type: Bug | Status: closed
Component: contrib.admin | Version: master
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted

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

* resolution: invalid => fixed


Comment:

rouf...@rtat.net

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

Reply all
Reply to author
Forward
0 new messages