Support » Plugin: WP Private Content Plus » Menu structure and user role not working

  • Resolved sfaught

    (@sfaught)


    Yes I am in the Menu structure trying to restrict the menus to certain users. Whenever I try to select more than one user role it will not save any of the selections except the first one I choose. If I select Subscriber first then Admin, then save and go back in the Subscriber will be the one that is saved and chosen. The Admin will go blank leaving only the first selected user role. This happens after I save them go back into and make sure it works and it does not.

    Any help would be appreciated, thanks!!!

    https://wordpress.org/plugins/wp-private-content-plus/

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author nimeshrmr

    (@nimeshrmr)

    I tried to reproduce this issue on my test sites. However, user roles are saved properly. Please check your browser console for any errors. If not, try deactivating all other plugins and saving the user roles.

    Okay I tried as you suggested but still no luck. I went in and deactivated EVERY plugin, deactivated WP Private Content then deleted it and then reinstalled it again. Made sure it was activated and that the Enable Private Content Module was checked. Went back to menu list checked the user roles and still no luck. This just doesn’t make sense!!

    Let me verify a few things…

    This plugin works with Multi Sites?
    Does it work with the latest version of WordPress (4.5.1)?
    In Appearance, Menu structure if I select Visibility, Permitted User Role I should be able to select more than one user role?

    Please anymore suggestions would be most appreciated, thanks!!!

    Plugin Author nimeshrmr

    (@nimeshrmr)

    Hi

    This plugin compatibility with multisite is not tested. If you can provide info on how to setup multisite similar to your site and steps, I can check and let you know.

    Yes its compatible upto WP 4.5. Not checked yet with 4.5.1

    Yes you should be able to select multiple user roles

    Thanks

    I am not sure I understand the part where you want me to explain? Can you give me more information?

    I am experiencing the same problem with WP version 4.5.2 (not multi-site)…even with all plugins disabled, multiple user roles are not being saved…only a single user role will save…

    locascioa,

    I have not had any luck with this still trying to figure it out, if you come up with anything please let me know as well, I will do the same.

    Thanks!!

    Still looking for help if you have any advice…

    Please anything to try and get this to work.

    Thanks!!!!

    The Sound Strategies development team is looking into this today. Hopefully they can get us a fix.

    Here is the fix for the issue with not saving multiple user roles and also to fix the label in the role selector.

    File: class-wppcp-menu.php.txt

    on 81 line:
    <div class=”” style=””>
    <input type=”checkbox” name=”wppcp_menu_roles-<?php echo $item->ID ;?>[]” id=”nav_menu_role-<?php echo $role; ?>-for-<?php echo $item->ID ;?>” <?php echo $checked; ?> value=”<?php echo $role; ?>” />
    <label for=”nav_menu_role-<?php echo $role; ?>-for-<?php echo $item->ID ;?>”>
    <?php echo esc_html( $name ); ?>
    </label>
    </div>

    on 101 line:
    $visibility_roles = isset($_POST[‘wppcp_menu_roles-‘.$menu_item_db_id]) ? $_POST[‘wppcp_menu_roles-‘.$menu_item_db_id] : array();

    locascioa,

    Wow, that did it!!!! Thanks for the help, you and the Sound Strategies development team are awesome!!!! So appreciated on this end!!!

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Menu structure and user role not working’ is closed to new replies.