fallingsprings / couch-add-ons

Couch Add-Ons
4 stars 3 forks source link

Syntax error in color-picker #4

Open janstieler opened 1 month ago

janstieler commented 1 month ago

Hi, in the color-picker there is a syntax typo in line 85. You have to wrap the if condition with a brackets. https://github.com/fallingsprings/couch-add-ons/blob/9e6051a2e5e22cb669156fe90baebdf9f6d2a6ca/color-picker/color-picker.php#L85

Cheers

janstieler commented 1 month ago

But after fix this I get only the default #ffffff color as output and the backend color is ignored. I have no Idea how to debug this because I get no output with var_dump or similar.

trendoman commented 1 month ago

But after fix this I get only the default #ffffff color as output and the backend color is ignored. I have no Idea how to debug this because I get no output with var_dump or similar.

This version of addon has been long outdated unfortunately. Try this version (which has a few more issues fixed and has alpha-channel support as demoed here https://www.couchcms.com/forum/viewtopic.php?f=8&t=12893#p38501 ) — color-picker.zip

janstieler commented 1 month ago

Thank you! But that I get the wrong color was not a problem from the plugin. In the meanwhile I found out that on my position in the template I can't call the color field. Sorry for that!

Best

trendoman commented 1 month ago

Thank you! But that I get the wrong color was not a problem from the plugin. In the meanwhile I found out that on my position in the template I can't call the color field. Sorry for that!

Best

NP. I don't mind in general giving some further assistance with this addon but if you experience more issues please post in forums where it's easier for me to respond and more people could join the topic. Cheers