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.
Drupal version: Latest 8.x HEAD
OS: Windows 7
Apache: 2.2.25 (Win32)
PHP: 5.4.25
Steps to reproduce
- Go to Appearance - Bartik - Settings. Color scheme Blue Lagoon (default) is selected.
- The controls to change UI colors are duplicated - see screenshot in #2
- Making changes in the top (normal) set of controls has no effect. After the [Save Configuration] button is clicked, the message says "The configuration options have been saved", but nothing has been changed, go back to the front page and the color scheme is still Blue Lagoon.
- Changes made in the second set of controls do stick however!
This worked a couple of weeks ago so something has changed recently.
Comment | File | Size | Author |
---|---|---|---|
#7 | 2221041.7.patch | 1.13 KB | alexpott |
#2 | Appearance_settings.png | 65.24 KB | StuartJNCC |
Comments
Comment #1
marcingy CreditAttribution: marcingy commentedSo this is strange. The issue is that there are infact too select dropdowns, the second one sticks and the former actually seems to be related to locking colours. So I think this is more a case where we need documentation to explain what the first field set is for vs the second.
Comment #2
StuartJNCC CreditAttribution: StuartJNCC commentedI see what you mean - I didn't spot that! So all the controls are now duplicated:
I don't think this is intended. I think it is a bug! - and maybe should be higher priority than "normal" since it seems to be quite a significant regression?
Comment #3
StuartJNCC CreditAttribution: StuartJNCC commentedComment #4
sunCan you try attached patch to see what causes the form to get invoked twice?
Comment #5
marcingy CreditAttribution: marcingy commentedThe function in question is only called once. The 2 form elements are not the same.
The top item is built by $form['scheme']
The lower is
So one is provide settings for a schema, while the other is too set the actual values for the theme. Yes it is totally confusing but I think the real issue is one needs better help text for the end user.
Comment #6
Jeff Burnz CreditAttribution: Jeff Burnz commentedMistake in the template?
Comment #7
alexpottI opened #2257321: Color form is duplicated without searching - bad me. This is a major bug - we could not release with it.
Same patch from that issue.
Comment #8
markhalliwellAttaching related issues which caused this regression. I'm tempted to say that this
|without
filter changed how the render arrays work.This patch shouldn't be necessary because the palette is already printed prior to the rest of the form.edit: after chatting with @alexpott in IRC, I was unaware that this is, in fact, the desired behavior and fundamental change with how render arrays work. The patch is correct.
Comment #9
alexpottWell plenty of templates already work this way - consider node.html.twig or node-edit-form.html.twig
Comment #10
marcingy CreditAttribution: marcingy commentedLooks good, I learned something new about twigg which is also good!
Comment #13
marcingy CreditAttribution: marcingy commented7: 2221041.7.patch queued for re-testing.
Comment #14
marcingy CreditAttribution: marcingy commentedComment #15
markhalliwellRTBC from me.
Before:
After:
Tests also pass locally (was unsure with the testbot random failures):
Test only patch:
Full patch:
Comment #16
webchickVery nice catch.
Committed and pushed to 8.x. Thanks!