• Ran into an issue today with using this plugin and Visual Composer. It’s not clear to me if this plugin is causing the issue or if it’s VC.

    I noticed that when I change permissions and/or capabilities for a role using URE then the Role Manager settings in Visual Composer for that role lose settings.

    1) User with “Editor” role has access to Visual Composer
    2) Edit “Editor” Role (any capability) and click Update
    3) Users with “Editor” role suddenly have no access to VC because VC Role Manager settings for that role have been reset to default

    I am filing this bug with the developers of Visual Composer as well.

Viewing 15 replies - 1 through 15 (of 15 total)
  • Plugin Author Vladimir Garagulya

    (@shinephp)

    Thanks a lot for this information.
    I reproduced the described scenario. I will search a reason and return to you with results.

    Plugin Author Vladimir Garagulya

    (@shinephp)

    WordPress itself writes capabilities to the roles with boolean values only. Roles data is stored at the database in a form of PHP serialized array: like this:
    s:10:"edit_posts";b:1;

    Tests showed that ‘Visual Composer’ allows itself to add to the role a capability with not boolean, but string value. We can see at serialized data after click ‘Save’ from Visual Composer Roles Manager:

    
    s:26:"vc_access_rules_post_types";s:6:"custom";
    

    It corresponds to the “Post Types: Custom” choice at Visual Composer Roles Manager.

    User Role Editor interpretes not empty value as a boolean ‘true’, so we still see ‘vc_access_rules_post_types’ capability turned ON, when we load this role. But when we change it, User Role Editor saves all capabilities as boolean values, as they should be. So after updating role with User Role Editor capability data becomes:
    s:26:"vc_access_rules_post_types";b:1;,
    not s:6:"custom" (string ‘custom’) as it was before, but b:1 (boolean true) as it must be.

    As expected when we open VC Role Manager again it does not see ‘custom’ value for ‘vc_access_rules_post_types’ capability and selects at post types dropdown list the 1st available option ‘Pages Only’.

    I think that plugins should not write to the core WordPress data structures any own data types – only types supposed by WordPress core. Capabilities should be boolean always.
    Thus Visual Composer developers should rewrite this part in order to correspond to WordPress core.

    Hi Vladimir,
    thanks for the explanation but unfortunately the problem is really annoyng.

    When the post option is reset the user lose the ability to use Visual Composer in post types. I’ve posted the same question in the VC Support Forum, meanwhile the changes the way they seave the prefs in the DB could you plan a workaround to avoid resetting Visual Composer prefs?

    Dear @cameronbarrett & @promoinvideo
    I am running into the same issue, can you please post a solution for this urgently?

    I am using a differtent plugin “Toolset access”, so I am sure it has nothing to do with the “User role plugin”, but must be something in Visual Composer self..

    Thanks!

    I am having the same issue. Is there a solution for this?

    I found out it was a conflict with the “VC elements plugin” ( which is even no longer available)

    I replaced this plugin with visual composers “templatera” and rebuild my content in a template.

    Thanks Buro. I don’t have VC elements plugin installed, so it must be something else.

    Same problem, after some time the role manager losing settings.

    We need a solution for this problem..

    Just to clarify, I don’t have ‘User Role Editor’ installed.

    These are the plugins that I have installed:
    – Akeeba Backup Professional for WordPress
    – Coming Soon Page & Maintenance Mode by SeedProd
    – Duplicate Post
    – Essentials Grid
    – MailChimp for WordPress
    – Simple Google reCAPTCHA
    – Slider Revolution
    – ThemeREX Addons
    – Visual Composer Extensions All In One
    – Watchful
    – WooCommerce (DEACTIVATED)
    – Wordfence Security
    – WP Media Folder
    – WPBakery Visual Composer

    Maybe if everyone else compares this list to the plugins that they have installed we might be able to narrow it down to a shorter list of common plugins?

    simonsucksmith

    (@simonsucksmith)

    Hi all. Does anyone have/found a solution to this issue at all? Been like this for me for a month now and I cannot seem to bottom the bug out, even after disabling pretty much all the plugins.

    Thanks.

    webcoast

    (@webcoast)

    For me it was a template issue which occured only when I deactivated WooCommerce. The template providers gave me a fix.

    Same problem, we have this problem with multiple websites. Sometimes the role manager settings are gone.

    Very irritating for our customers…

    Put this code in your function.php file, worked for me untill now ??

    /* SET VISUAL COMPOSER DEFAULT OPTIONS */
    $list = array(
    ‘page’,
    ‘post’,
    ‘custom type 1’,
    ‘custom type 2’
    );
    vc_set_default_editor_post_types( $list );

    This code keeps the settings alive after updating…

    • This reply was modified 6 years, 9 months ago by Buro 86.

    Many thanks! Any idea they are going to fix this?

    We run VC on many websites…

    Thanks so much – worked a treat.

    I think it maybe issues with the Theme we are using – Headway.

    Looking to move to Astra now as looks great.

    Thanks for the info.
    Cheers
    Simon

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Bug with User Role Editor and Visual Composer’ is closed to new replies.