#35273: AdminFileWidget renders two elements with the same ID --------------------------------+------------------------------------- Reporter: Johannes Maron | Owner: nobody Type: Bug | Status: closed Component: contrib.admin | Version: 5.0 Severity: Normal | Resolution: needsinfo 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 Natalia Bidart):
* resolution: => needsinfo * status: new => closed Comment: Thank you Johanness and Jörg! Before accepting, we'd still need a sample project or test case showcasing the issue, as I can't reproduce the duplicated ID symptom (I'm using latest `main` though). I created a project of my own and defined a model with a FileField, then configured its admin so the `AdminFileWidget` is used. This is the resulting HTML which looks correct to me (at least it does not have duplicated `id`s): {{{ <p class="file-upload">Currently: <a href="/images/test_X66RiS7.py">images/test_X66RiS7.py</a> <span class="clearable-file-input"> <input type="checkbox" name="avatar-clear" id="avatar-clear_id"> <label for="avatar-clear_id">Clear</label></span><br> Change: <input type="file" name="avatar" id="id_avatar"></p> }}} -- Ticket URL: <https://code.djangoproject.com/ticket/35273#comment:6> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/0107018e14139d31-53d0e32a-92f9-44fb-bee5-7b314ea64e42-000000%40eu-central-1.amazonses.com.