Closed (fixed)
Project:
Color Field
Version:
8.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
4 Jul 2016 at 11:56 UTC
Updated:
17 Sep 2018 at 04:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
kasperg commentedComment #3
kasperg commentedAs far as I can tell the Spectrum library expects configurations to be boolean but Drupal stores these as strings ("1") or numeric values (0). This already seems to be addressed for one setting. The attached patch takes the same approach for the remaining settings.
I have also included a patch which applies to 8.x-2.0-rc1 for good measure.
Comment #4
kasperg commentedComment #6
gerzenstl commentedThe issue that affects this option, is affecting also to the other ones like show palette, buttons, ...
The PHP values exposed for the spectrum widget are the following:
On Javascript, the double quotes operator works with integers like 0 or 1 but not with strings like "0" or "1".
The only scenario where you won't reproduce the issue is when you use the default values for this widget.
I made a port of the approach taken for the D7 version to solve the issue. I tested all options and all of them are working fine with this fix.
Comment #8
gerzenstl commentedComment #9
gerzenstl commentedThe CI error seems unrelated to the patch I submitted.
ERROR: No valid tests were specified.Comment #10
casivaagustin commentedI have tested the patch and works well for me
Comment #11
gerzenstl commentedping
Comment #12
gerzenstl commentedCI error is gone and patch is ready for review.
Comment #13
nickdickinsonwildeSince the other settings have already been fixed by other issues, mostly ditched the patch. Used the knowledge from that patch to use type casting for clearest/quickest code. Also, added a test. Thanks for the report and patch.
Comment #15
nickdickinsonwilde