• Resolved pragmastef

    (@pragmastef)


    in the Duplicate Post Options at wp-admin/options-general.php?page=duplicatepost it seems that Custom user roles are not showing.
    This used to work in earlier version and stopped for a while.
    We have a custom role called Applicant which is based on Editor
    The Custom role(s) cannot be selected in the options page and the link to duplicate post will not show on the front end for an user with this custom role.

    This is quite urgent

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter pragmastef

    (@pragmastef)

    Note that the custom user role is correctly registered and displays on the User profile selector.
    The custom role also display when outputting get_roles().

    Hello!

    Can you please make sure you’re running the latest version of WordPress (5.6), Yoast Duplicate Post (4.0.1), and the latest version of your theme and other plugins?

    If everything’s updated on your end, we recommend performing a conflict check and deactivate other plugins to see if the issue resolves.

    Thread Starter pragmastef

    (@pragmastef)

    Hi,
    All plugins and versions are up to date.
    The plugin works, the restriction by user role is working for Administrators or other User roles checked in the admin settings.
    The custom user role is not displayed in the Roles allowed to copy.

    Running get_roles() in the theme, does display the custom user role. It is not available to be checked in the admin panel.

    Troubleshooting mode does not resolve the issue.

    • This reply was modified 5 years, 4 months ago by pragmastef.
    Plugin Author Enrico Battocchi

    (@lopo)

    Hi @pragmastef,
    how did you create the Applicant role based on Editor? Does it have the edit_posts capability?

    Thread Starter pragmastef

    (@pragmastef)

    Hi @lopo ,
    Yes the Applicant role has Publishing and Editing capability
    The Applicant can Edit post from the front end.
    It is just the Duplicate link generated by duplicate_post_clone_post_link() that is not displayed.
    The link shows for administrators.

    The Role doesn’t show in the list generated in the admin setting

    Roles allowed to copy
    Administrator
    Editor
    Author
    Contributor
    SEO Manager
    SEO Editor

    Plugin Author Enrico Battocchi

    (@lopo)

    Hi @pragmastef
    what tool did you use to create the custom role?

    Thread Starter pragmastef

    (@pragmastef)

    Hi @lopo
    The custom role was created using code.
    The custom role is displaying correctly on the User profile selector.
    It is also displaying correctly if outputting get_roles().

    Something must not be right in your function generate_roles_permission_list() in src/admin/class-options-form-generator.php

    Plugin Author Enrico Battocchi

    (@lopo)

    Hi @pragmastef,
    you’re right, that’s the part of the code involved but it’s basically the same code that was present in versions from 3.2.3 on so we are not expecting a regression.

    Can you show us the code snippet to create the custom role, so we can try to reproduce the bug?
    Thanks!

    Thread Starter pragmastef

    (@pragmastef)

    Hi @lopo

    The custom role was added by a custom plugin.

    I have installed User Role Editor.
    Using the plugin, I was able to force the edit and publish_posts to the Applicant role.
    This made it visible in Duplicate Options admin.
    And the link is now visible in the front end.

    It’s a workaround which will work for the moment.
    Thanks for looking into it

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Issue with custom user Role’ is closed to new replies.