pods
pods copied to clipboard
For extended comments built-in field "comment_post_ID" is treated as pick, but formed wrong.
This is the field's data right when it hits L791 of Pods class, which is
if ( 'pick' == $field_data[ 'type' ] && in_array( $field_data[ 'pick_object' ], $simple_tableless_objects ) ) {
Note that is doesn't have a pick object set, and therefore throws an error on this line:(
There was some internal handling this was going to be used for, a fix can just change the field type in the object fields declaration in PodsAPI.
@sc0ttkclark I looked at where this happens. Many of the fields are pick, like the reference to author. This, leads to two options to fix:
-
Set a pick_option for this field. BTW I tried this, and it set off new errors, which lead me down a rabbithole, so I just used a native comment query, which BTW[1] has really nice handling of comment meta.
-
Switch this field, and all built-in comment fields to text fields.
I vote for option 2. Its an easy fix and makes the most sense. Not sure what value having them as pick, fields gives us, given that they are not exposed in our UI as such, and we can already query by their values with Pods, or native query classes.