craftpulse / craft-colour-swatches

Let clients choose from a predefined set of colours.
MIT License
34 stars 23 forks source link

Default swatch value returns as null #109

Closed gateszies closed 6 months ago

gateszies commented 1 year ago

We're experiencing a bug with this plugin where the selected default value is not actually defining anything by default.

Our Colour Swatch field has the default swatch selected as indicated with the checkmark.

Screen Shot 2023-05-23 at 5 08 51 PM

The default swatch is also indicated by the highlighted option on the entry that uses the field.

Screen Shot 2023-05-23 at 5 10 44 PM

When we load the page, however, we are getting an error that indicates the field value is null. This is confirmed by dumping the value of the field on a blank page which also returns null.

Screen Shot 2023-05-23 at 5 11 57 PM

If you interact with the field and select a color, everything works as intended. But the field must be interacted with, making the default option not functional. The selected default swatch option should pass through the value of the swatch without the user needing to interact with the field and select a swatch.

We are currently running on Craft 4.4.7.1 and Colour Swatch 4.3.0.

cookie10codes commented 1 year ago

@gateszies thank you for reporting this bug, sorry you've had to wait for answers. This will be fixed in the next release

gateszies commented 1 year ago

Thanks so much @cookie10codes!

turnstylerj commented 6 months ago

Any ETA on this fix getting in? This is still an issue on v4.3.0 and prevents Colour Swatches fields from being required and saved as-is in a field layout.

2024-03-19 at 15 36 41

cookie10codes commented 6 months ago

hi @turnstylerj , sorry to get back so late on this issue. We recently took over the plugins and we're planning some development work. We will take this issue prior on our task list

cookie10codes commented 6 months ago

sorry for the wait @gateszies and @turnstylerj, this has been fixed on C4

turnstylerj commented 6 months ago

Awesome, cheers!