Support » Plugins » [Plugin: Role Scoper] Problem Displaying Custom Fields with RS

  • Resolved fredhead


    I’m using Custom Post Type UI to create content post types (an FAQ), Advanced Custom Fields to define field types for the custom post types, and Role Scoper to manage access to creating FAQs and viewing FAQs. All three plugins appear to work (on LAMP, PHP5).

    However, when I login with a test account set to permissions WP-Author, the custom fields do not appear. When I deactivate Role Scoper and login with the same account, the custom fields do appear. While I can’t find it today, yesterday I came across one or two posts on the internets that said to set the WP-Author role as FAQ Author and WP-Editor role as FAQ Editor. That did not fix the issue. I’d appreciate help debugging.

    First, here are the assigned permissions for my author test account, what appears on the login’s profile page:

    Scoped Roles
    Assigned WordPress Role: Author
    (contains Link Reader, Post Reader, Post Contributor, Post Author, Page Reader, FAQ Reader, Document Reader)

    Additional General Roles: Category Assigner, Document Contributor, FAQ Author, Post Tag Assigner, Private Document Reader
    (contains Document Reader, FAQ Reader, FAQ Contributor)

    Second, here’s the output from Roles > General in Role Scoper for my FAQ custom post type:

    FAQ Reader
    Private FAQ Reader
    FAQ Contributor
    FAQ Author Groups: [WP author]
    FAQ Editor Groups: [WP administrator], [WP editor]
    Category Manager
    Category Assigner Groups: [WP author], [WP editor]
    Post Tag Manager
    Post Tag Assigner Groups: [WP author], [WP editor]

    With Role Scoper on, what this author login does see on the Add/Edit an FAQ page is the Title field and the WYSIWYG textarea (or a version of it).

    Finally, in searching yesterday, one possible solution had to do with timing for each of these plugins, when they were fired off. However, I can’t find the URL and I have no idea how to make that happen. If you think that’s the issue, could you also explain how to adjust what WordPress processes first, second, third.

    BTW Role Scoper works great filtering content based on categories and roles. The only issue I’m having is this one which appears to be caused by Role Scoper (because the custom fields appear fine when Role Scoper is deactivated).

    Any ideas what settings I should check? Thank you!

Viewing 11 replies - 16 through 26 (of 26 total)
  • What “Content Administrator” capability do you show in Roles > Advanced > Administrator Defintion? Does you WP Administrator role def have that capability?

    The line is perhaps this:

    Content Administrator activate_plugins RS never applies restricting or enabling content filters

    Okay, that’s the default. And your WP Administrator role still has that capability?

    What WP version are you running? Multisite?

    Do you see the same behavior with the current RS development code (1.3.43-dev)?

    WordPress version is 3.1.4, the last before 3.2. Single site. The only plugins are RS and Event Manager. Everything else (e.g. custom post types) are hard-coded in functions.php.

    What WP Administrator role has what capability? I’m able to activate plugins, manage users, and manage RS roles.

    Kevin, where can I get dev version 1.3.43?

    Kevin, where can I get dev version 1.3.43?

    Follow the “Other Versions” link on

    It’s the “Development Version”

    Any followup on this before I release 1.3.43?

    I would not hold up the release for me.

    With the Role Scoper dev version and WP 3.2, two of my three custom post types do not appear at all on the left side navigation (before the two headings appeared but the flyout nav only showed Categories, not the heading name (e.g. Articles) and Add New [Heading Name]. However, while I have crafted my CPT code carefully, and it all works fine with RS turned off, I have not formally tested to prove my code is not the problem. With CPT documentation (how to create the code by hand) so atomized over the internet, it is theoretically possible something in my code misbehaves with RS code. That said, I’ve been extremely careful, have walked back broken code, and ensured everything works fine (without RS).

    So I don’t know how to proceed. If you are interested in the problem, I’d be happy to grant you access since it is a tightly controlled test site. But we’d have to communicate offline (I’d report out whatever we found here, of course, for the community). If you’re not interested, then I’m stuck with the option of having to try RS with whatever CPT plugin you recommend. I need a lot of control over CPT details and found, as of April 2011 last, that none of the plugins had the control I wanted.

    If you drop me a contact, we can discuss this further.

    For historical purposes, the problem was caused by the flush_rewrite_rules() called after register_post_post_type() I had in my functions.php file. I had used flush_rewrite as part of solving a problem with custom post type URLs. Removing the flush_rewrite rules left my custom post type URLs intact while resolving the issue here where RS did not display all three of my custom post types on the left navigation of the WordPress admin screen.

    On the issue of how to use RS to limit access to content, it appears that creating groups, assigning users to groups, then restricting content based on groups, proved to be the cleanest and easiest route. I have one minor issue related to categories not displaying in one or two cases but expect that to be easy to fix.

Viewing 11 replies - 16 through 26 (of 26 total)
  • The topic ‘[Plugin: Role Scoper] Problem Displaying Custom Fields with RS’ is closed to new replies.