You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Grab the post meta for the new post ID via wp post meta list [id-of-post]
The bool value will be false/'off' instead of the expected true/'on'.
Repeat the same with a value of 'on' and post meta should save correctly.
Expected behavior
Boolean values passed for boolean fields should save.
Version information
Plugin version: 0.19.2
WordPress version: 6.0.1
Additional context
From the report in Slack:
l believe there's a bug in how boolean values are being evaluated in the /plugins/atlas-content-modeler/includes/publisher/lib/field-functions.php file. It should be checking for true/false on line 327. Instead it checks for "on" and booleans are never set as true in the model.
Relevant lines (perhaps check for true or 'on' instead of just 'on', or migrate to real boolean values):
insert_model_entry
only updates boolean values to true if'on'
is passed in place oftrue
.To reproduce
wp post meta list [id-of-post]
Repeat the same with a value of 'on' and post meta should save correctly.
Expected behavior
Boolean values passed for boolean fields should save.
Version information
Additional context
From the report in Slack:
Relevant lines (perhaps check for
true
or'on'
instead of just'on'
, or migrate to real boolean values):atlas-content-modeler/includes/publisher/lib/field-functions.php
Lines 326 to 327 in 8a2c543
Workaround
Boolean field values have to be cast as 'on' or 'off':
The text was updated successfully, but these errors were encountered: