• Salam n Hola

    I’m playing with adding Custom Fields to WordPress Users. I’ve set it up to save data into pods tables.

    I’m also adding Users as Relationships to other Custom Post Types.

    Two places where I get error messages:

    1. When I create a New Role using Pods
    2. When I try to add a user into the Custom Post Type.

    The following are the error messages

    [24-Jun-2021 05:35:33 UTC] WordPress database error Unknown column 'wprh_capabilities.meta_value' in 'where clause' for query SELECT
                    
                    DISTINCT
                    <code>t</code>.<code>ID</code>, <code>t</code>.<code>display_name</code>
                    FROM <code>wprh_users</code> AS <code>t</code>
                    LEFT JOIN <code>wprh_pods_user</code> AS <code>d</code> ON <code>d</code>.<code>id</code> = <code>t</code>.<code>ID</code>
                    WHERE ( ( <code>wprh_capabilities</code>.<code>meta_value</code> LIKE "%\"wowers\"%" ) AND ( <code>t</code>.<code>user_status</code> = 0 ) )
                    
                    
                    ORDER BY <code>t</code>.<code>display_name</code>, <code>t</code>.<code>ID</code> made by require('wp-admin/edit-form-advanced.php'), do_meta_boxes, PodsMeta->meta_post, PodsForm::field, PodsField_Pick->data, PodsField_Pick->get_object_data, PodsData->select, pods_query, PodsData::query
    
    [24-Jun-2021 05:36:31 UTC] PHP Fatal error:  Uncaught Error: Object of class WP_Role could not be converted to string in /home/.../public_html/wp-content/plugins/pods/classes/PodsComponents.php:785
    Stack trace:
    #0 /home/.../public_html/wp-includes/class-wp-hook.php(292): PodsComponents->admin_ajax('')
    #1 /home/.../public_html/wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters('', Array)
    #2 /home/.../public_html/wp-includes/plugin.php(484): WP_Hook->do_action(Array)
    #3 /home/.../public_html/wp-admin/admin-ajax.php(187): do_action('wp_ajax_pods_ad...')
    #4 {main}
      thrown in /home/.../public_html/wp-content/plugins/pods/classes/PodsComponents.php on line 785

    Seems like it needs a “capabilities” table. That’s certainly not a standard WP table. Am I missing a required add on plugin?

    Any ideas why this is happening?

    **UPDATE**
    If I were to remove the Role from User selection option in the Custom Post Type, then I can pick a user from the entire list of users in WordPress. It’d be good if I can set the Role to be selected from.

    Oh yeah.. I misread the error message. It’s not looking for a capabilities table. IT’s looking for a capabilities.meta_value in the wp_users table.

    Thanks..

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Jory Hogeveen

    (@keraweb)

    Hi @kodeexii

    I cannot reproduct the error for creating a new role.
    For the other error I’d need a bit more information. Could you share more about this error? Like your field configuration and the full stack trace of the error?

    Cheers, Jory

    Plugin Author Jory Hogeveen

    (@keraweb)

    Closing topic due to no reply, feel free to reopen if you still need help!

    Cheers, Jory

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Pods User Capabilities Table?’ is closed to new replies.