Relationship Field Not Working Anymore

Support MB Relationships Relationship Field Not Working Anymore

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #46005
    Mehmet KMehmet K
    Participant

    Hi,

    I created two CPT's in MetaBox. One is doctor and the other is room. The idea is to choose the doctor that works in a specific room as the rooms are not used by one doctor only.

    I also had created custom user roles and one such role is called Assistant.

    Up until couple days ago I think, for more than a year, this setup worked perfectly. But today the users told me that they cannot select the doctors when editing a room.

    I tried it with my admin user, no problems. But when I logged in with a test user (assistant role), I see that they the list shows no doctors at all.

    There's been no changes in the site, settings, etc. All of a sudden, the relationship field to choose the doctor within the Room CPT doesn't show any doctors for the user roles.

    Capability type for both CPTs is post

    Here's a screenshot of the CPT settings: CPT Settings

    Here's a screenshot of the Relationship settings: Relationship

    Here's the code snippet example I used to add the user role assistant.

    add_role('assistant', __(
       'Assistant'),
       array(
           'read'            => true, // Allows a user to read
           'create_posts'      => false, // Allows user to create new posts
           'edit_posts'        => false, // Allows user to edit their own posts
           'edit_others_posts' => false, // Allows user to edit others posts too
           'publish_posts' => false, // Allows the user to publish posts
           'manage_categories' => false, // Allows user to manage post categories
           )
    );

    Kindly asking for ideas. Thank you all and the team.

    #46006
    Mehmet KMehmet K
    Participant

    CPT Settings
    CPT

    Relationship Settings
    Relationship

    #46011
    PeterPeter
    Moderator

    Hello,

    If the user role Assistant only has the capability read enabled, how does the user create or edit a post? Do you submit the post in the frontend with the Frontend Submission form?
    I test to add a custom role Assistant on my demo site and can still see the post type in the relationship box in the frontend.

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