#30502 closed Bug (invalid)
Admin interface hangs on models with "parentNode" field .
Reported by: | Jari Tenhunen | Owned by: | nobody |
---|---|---|---|
Component: | contrib.admin | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
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:
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)
Change History (1)
comment:1 by , 6 years ago
Component: | Uncategorized → contrib.admin |
---|---|
Resolution: | → invalid |
Status: | new → closed |
Summary: | Admin interface freezes if model has a relation named "parentNode" → Admin interface hangs on models with "parentNode" field . |
Triage Stage: | Unreviewed → Accepted |
Type: | Uncategorized → Bug |
Version: | 2.2 → master |
Note:
See TracTickets
for help on using tickets.
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 namedparentNode
. 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