Saving problem with multiple user roles

Support MB User Meta Saving problem with multiple user rolesResolved

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #6067
    DavidDavid
    Participant

    Hi,
    I added a Metaboxes using the User Meta plugin, with a include option:

    'include' => array(
    'user_role' => array('user_test'),
    ),

    I need to use multiple roles for each user, so I used this plugin (https://wordpress.org/plugins/multiple-roles/) to enable this "hidden feature".

    The problem is that activating this plugin, the Metaboxes is properly displayed when a user user_role match to that included in the "includes" option, but when I save the user page, all the metabox.io fields are not saved.

    How could I do to fix it?

    Thanks,
    David

    #6085
    Truong GiangTruong Giang
    Participant

    Hi there,

    Can you provide the code you use to register meta box? I tested with above plugin but don't meet the issue.
    Thank you.

    #6090
    DavidDavid
    Participant

    Hi, here the code used to register the Metaboxes.

    https://ghostbin.com/paste/uqmou

    Thanks,
    D

    #6099
    Truong GiangTruong Giang
    Participant

    Hi there,

    We have just updated MB Include Exclude extension. Please update it and check if problem has gone. Thank you.

    #6100
    DavidDavid
    Participant

    Hi, thanks!
    Now the metabox save their data and the "exclude" option work well, but using the "include" option (like the code above), the Metabox remains visible to all user_roles.

    The backend page: https://tppr.me/mPGHs

    #6119
    Truong GiangTruong Giang
    Participant

    Hi,

    If you (current user) has edit_users capability, you can see the meta box for every roles. Please try creating 2 test users with different roles and login to each account to test.

    Thank you.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.