Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hello
On the image_style_form() the row in the draggable table which is contain the select list with the new effects has no class "draggable".
Comment | File | Size | Author |
---|---|---|---|
#3 | 942060.patch | 1.85 KB | Sweetchuck |
Comments
Comment #1
ygerasimov CreditAttribution: ygerasimov commentedAs I understand the bug is on the page of the configuring effects for image style, right? I can't reproduce on current HEAD. All rows (including new ones created) are draggable. Please advise how to catch this bug.
Comment #2
SweetchuckI can reproduce this issue on current HEAD from CVS.
I have a brand new installation with the standard profile.
goto ?q=admin/config/media/image-styles/add
Style name = foo
redirected to ?q=admin/config/media/image-styles/edit/foo
add an effect (desturate)
Now the first row in the table is the desaturate, with the drag icon.
Second row (last) is the select list _without_ the drag icon. Missing the draggable class from the <tr> tag.
I can drag the row of desaturate under the select list, but I can't move back above.
In the form builder function image_style_form() not initialize the $form['effects']['new']['weight']['#access'] because
the $form['effects']['new'] element only accessible if the image style is not a default style.
But the theme_image_style_effects() function check this
!empty($form[$key]['weight']['#access'])
this is always FALSE where the $key is equal to 'new'
Comment #3
SweetchuckThis patch is wrong. Sorry.
The right line is:
Comment #4
ygerasimov CreditAttribution: ygerasimov commentedI confirm this bug and patch #3 fixes the problem.
Comment #5
nevergone CreditAttribution: nevergone commentedThis is bug is exist.
The patch is correct and repairs the bug.
Comment #6
webchickWhile this breaks UX freeze by making the add row draggable, it does fix the bug indicated in #2. Since the "add row is draggable" pattern is also used in field UI, one could make the argument that its introduction is a bug fix here as well.
So Committed to HEAD, thanks!