Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
color.module
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 Mar 2014 at 10:41 UTC
Updated:
29 Jul 2014 at 23:27 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
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 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 commentedComment #4
sunCan you try attached patch to see what causes the form to get invoked twice?
Comment #5
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 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
|withoutfilter 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 commentedLooks good, I learned something new about twigg which is also good!
Comment #13
marcingy commented7: 2221041.7.patch queued for re-testing.
Comment #14
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!