Possible bug with user-meta at command line …
-
Hi – i think i found a bug and not sure if it is with PODS or wp-cli or just the way things are ..??.. i’ve also reported this issue on wp-cli github but thought i should do similar here in case this is a PODS thing … details below … cordially, chuck scott
ps – PODS ROCKS – thank you for such a powerful plugin :>)
– note the link to the issue report on github =
https://github.com/wp-cli/wp-cli/issues/948 … user-meta bug – field not updated despite success messageand essense of my findings = i created a couple extra user fields using PODS and when i used wp-cli to update one of the fields, i consistently got “Updated custom field.” success message yet the field was not updated in db …
in trying to understand what was going on, i ultimately found that the user-meta field does not like relationship type fields and once i set that field to a simple text field, voila – the wp user-meta set worked …
background fyi … initially i used PODS to extend the User Profile by adding three fields – a membershiptype, an expire date, and expire date as number … the membershiptype field was originally a relationship field type with three pull down select options to choose from for ADMINS only …
after i started getting false positives, i tried changing permissions on this field from required to none, from admin only, to anybody, etc … and in all cases the wp user-meta set came back with success messages although none were literally added to the db … so the false positives did not seem related to the PODS field permission settings …
however once i changed the field type to text, then the db actually got updated …
my other two fields, a date field and a text field, had no issues with being updated … so i’m thinking there is bug of sorts with either wp-cli or the way PODS registers the user fields or ..??..
other background notes = i did install the PODS command line tool but realized that it was more suited for adding, removing PODS and not necessarily getting info within POD fields and mention only as fyi as having it installed or not had no impact on the false positives …
purpose … my original goal in setting the PODS membershiptype field to a relationship was that i was hoping to avoid any typos if site admins were entering the value options manually thus thought “okay cool – i’ll create a simple relationship field that relates to a custom defined list with options so that admins can pick from one of a couple options. then i’ll make that option viewable to the user but not editable yada yada” …
– fin –
- The topic ‘Possible bug with user-meta at command line …’ is closed to new replies.