• Resolved nyakuza

    (@nyakuza)


    I’ve set the “Show the dashboard widget for” feature to show for Editors and above, and it’s working great for my main Editors. However it is also showing up for users who are not Editors.

    I can see in your code that this setting is tied to the “edit_others_posts” permission.

    There are a few users who are allowed to edit their own posts, but not others, so they do not have the “edit_others_posts” permission, and yet they can also see the dashboard widget.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Zafer – WPMU DEV Support

    (@wpmudevsupport15)

    Hi @nyakuza,

    I hope you are doing well today!

    I tested but could not replicate the issue you are referring to. When you set Editor and above for Show the dashboard widget for settings
    https://prnt.sc/zuQfV2SWpkS9

    Dashboard widget only is available for Editors and Administrators (which is above Editors). I created one profile as Author and could not see the widget.

    Therefore, I can only suggest plugin/theme conflict test at this stage.

    Please make sure you have recent backups and perform this operation on your dev/staging site if possible.
    To learn more about a conflict test, please see this guide below:
    https://wpmudev.com/docs/getting-started/getting-support/#conflict-test

    Check out this handy flowchart of the troubleshooting process detailed above.
    https://wpmudev.com/wp-content/uploads/2015/09/Support-Process-Support-Process.gif

    Kind regards,
    Zafer

    Thread Starter nyakuza

    (@nyakuza)

    Thanks for the suggestions. I tried those various troubleshooting methods, but unfortunately I couldn’t resolve this.

    Interestingly, I even tried editing the plugin code to target a different permission, which still didn’t work. I went into the core.php file (legacy/core/core.php) and targeted this line:

    _x( 'Editor and above', 'dashboard widget visibility', 'broken-link-checker' ) => 'edit_others_posts',

    I changed from ‘edit_others_posts’ to a custom permission I added to WordPress, and then only gave that custom permission to one user. In that instance it wouldn’t show up for them, but it did still work for Admins.

    Plugin Support Dmytro – WPMU DEV Support

    (@wpmudevsupport16)

    Hello @nyakuza,

    Thanks for letting us know, glad to hear that you’ve found the workaround.

    Unfortunately we couldn’t replicate the same behavior, when switching edit_others_posts capability on/off for a user role. Could you please share some details about the user role that is affected in your case, which may help us with replicating the issue.

    For example, was it working correctly out of the box for the default WordPress user roles?

    Could you please also check and let us know which capabilities are granted for that particular role. For instance, using a plugin like User Role Editor.

    Looking forward to your reply.

    Best Regards,
    Dmytro

    Plugin Support Patrick – WPMU DEV Support

    (@wpmudevsupport12)

    Hi @nyakuza

    I hope you are doing well.

    We haven’t heard from you in a while, I’ll go and mark this thread as resolved. If you have any additional questions or require further help, please let us know!

    Best Regards
    Patrick Freitas

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Show dashboard widget – setting not working correctly’ is closed to new replies.