Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#24676 closed Bug (fixed)

Regression on ManytoMany representation in the admin interface

Reported by: CARRIERE Etienne Owned by: nobody
Component: contrib.admin Version: 1.8
Severity: Release blocker Keywords:
Cc: CARRIERE Etienne Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by CARRIERE Etienne)

Hi,

We have discovered a small regression in 1.7 with the ManytoMany representation in admin page :
Configuration to reproduce :

  • Have a ManytoManyField
  • Put the ManytoManyField as a filter_horizontal block (I am not sure if it is mandatory)

Behaviour :

  • Before the #13165 ticket commit, below the 'form-row' div, we have a second div (without class) and below this block is directly the different blocks
    • The label
    • The elements for the widget => in the same level as the other elements
    • The help paragraph

With the javascript in SelectFilter2 (in admin/js), the help paragraph is put on the first place of the div block (the one without class)

  • After the #13165, a div block ( 'related-widget-wrapper' ) has been added so that the second div looks like :
    • The label
    • A new div 'related-widget-wrapper'
    • The help paragraph

Proposal to solve
I see 2 methods to solve the bug

  • Don't use the 'related-widget-wrapper' for the ManytoMany as the ticket #13165 was made only for the classical ForeignKey
  • Modify the SelectFilter2 js to adapt to the new block

Change History (9)

comment:1 Changed 5 years ago by CARRIERE Etienne

Summary: Regression on ManytoManyRegression on ManytoMany representation in the admin interface

comment:2 Changed 5 years ago by CARRIERE Etienne

Description: modified (diff)

comment:3 Changed 5 years ago by Tim Graham

Severity: NormalRelease blocker
Triage Stage: UnreviewedAccepted

Is the bug only that the help text "Hold down "Control", or "Command" on a Mac, to select more than one." now appears misaligned to the right or is there something more?

comment:4 Changed 5 years ago by CARRIERE Etienne

Cc: CARRIERE Etienne added

comment:5 Changed 5 years ago by CARRIERE Etienne

Yes, the bug is that the JS code in SelectFilter2 file is no more operationnal . I haven't see more side effects on the ManytoMany managment by the admin interface when migrating from 1.7 to 1.8 .

comment:6 Changed 5 years ago by Tim Graham

Hm, the widget works fine for me and the selenium tests for it are passing. Any chance you are using a third-party app that might be causing the breakage? Can you clarify exactly what functionality isn't working or submit a patch with what change you think needs to be made?

comment:7 Changed 5 years ago by Tim Graham

Has patch: set

PR to fix help text positioning.

comment:8 Changed 5 years ago by Tim Graham <timograham@…>

Resolution: fixed
Status: newclosed

In 2c3ce26b:

Fixed #24676 -- Fixed help text positioning in contrib.admin filter_* widgets.

comment:9 Changed 5 years ago by Tim Graham <timograham@…>

In 77ed1548:

[1.8.x] Fixed #24676 -- Fixed help text positioning in contrib.admin filter_* widgets.

Backport of 2c3ce26beb254101f12fa69cc341ba9aeae62029 from master

Note: See TracTickets for help on using tickets.
Back to Top