Open bobbingwide opened 1 year ago
In the servers the post meta value showed that the field had been serialized twice.
This is the output when the checkboxes selected are red
and amber
and the meta data has been cloned.
s:36:"a:2:{i:0;s:3:"red";i:1;s:5:"amber";}";
the value should be
a:2:{i:0;s:3:"red";i:1;s:5:"amber";}
In actual fact, updating the field in the ACF metabox didn't appear to survive the round trip.
This red herring was a side effect of having the Checkbox field in two field groups with the field having the same name due to it being part of a clone
field type. When editing the post meta you have to edit the last of the fields with the same key.
This is a known feechur of ACF.
Detected after cloning content from s.b/oikcom, the logic to render the checkbox field, which uses the rendering for select, doesn't produce the expected results. We see the following Notice
phpMyAdmin shows the values being stored as below.
meta_id post_id meta_key meta_value
393844 49098 checkbox a:1:{i:0;s:3:"red";}
393892 49098 select red
In actual fact, updating the field in the ACF metabox didn't appear to survive the round trip.