WordPress.org

Ready to get started?Download WordPress

Forums

Role Scoper
[resolved] Can't see custom posts in admin dashboard as " Editor" (4 posts)

  1. Ville Mattila
    Member
    Posted 2 years ago #

    Hi,

    I am trying to allow editing and authoring of my custom post type for WP Editors. With the help of Role Scoper, I have given WP Editors extra RS "(Custom Type) Editor" role from Roles > General admin page. When checking out the available roles from the user profile page, I can see that this "(Custom Type) Editor" role is properly enabled.

    When being as an editor user, dashboard shows a link to my Custom Type, but the listing is empty. When checking out the listing as an administrator user, I can see all posts properly. If I remove the RS's "(Custom Type) Editor" from WP Editor, the admin link disappears.

    As some kind of clue, when I enable WP_DEBUG mode, I will get a notice on top of the listing page:

    Notice: Undefined index: in /var/www/wp-content/plugins/role-scoper/query-interceptor_rs.php on line 986

    I tracked down the file and it seems that $cap_name variable is empty at that line 986. I confirmed it with var_dump().

    Another "oddity" (that may or may not relate to this issue) is at Network's Role Options -> RS Role Definitions tab. I have also a custom category (taxonomy) related to this Custom Type. When checking out the RS Role Definitions tab, I can see under category roles that there are Custom Category Manager and Custom Category Assigner. Strangely, the related checkboxes are labeled as "Manage Categories" and "Assign Custom Category", so they differ from each other. I checked also the HTML and the checkbox has value "manage_categories", where the other has "assign_custom_category".

    Well, this was long explanation - hope that someone would have some ideas what's going on between Role Scoper and my Custom types ;)

    Installed versions: WP 3.4.1 in Network mode, RS 1.3.57-dev (downloaded 1/Sep/2012) - same with 1.3.56.

    Thanks,
    Ville

    http://wordpress.org/extend/plugins/role-scoper/

  2. Ville Mattila
    Member
    Posted 2 years ago #

    I think I managed to find at least some kind of solution on this issue.

    My custom type capability_type argument was not unique (in register_post_type function call). After making it unique to the post type and adding map_meta_cap argument too, I got the custom post types listed as Editor role.

    However one more oddity to the case: I noticed that the related taxonomy needs at least one term to make the posts visible. If the taxonomy is empty, nothing is listed. It does not matter whether the taxonomy term assigned to any post. Strange. ;)

    Also, the RS Role Definitions tab issue (Manage/Assign Category) still exists.

    Ville

  3. kevinB
    Member
    Plugin Author

    Posted 1 year ago #

    I noticed that the related taxonomy needs at least one term to make the posts visible. If the taxonomy is empty, nothing is listed.

    From your other comment, I take it this is the wp-admin listing? I'm having trouble creating the error. When I register a new hierarchical taxonomy (with no terms) to a post type and assign a [Post Type] Editor role, the posts are listed. Do you have any RS restrictions set for the post type or taxonomy?

    When checking out the RS Role Definitions tab, I can see under category roles that there are Custom Category Manager and Custom Category Assigner. Strangely, the related checkboxes are labeled as "Manage Categories" and "Assign Custom Category", so they differ from each other.

    I haven't been able to reproduce that either.

  4. kevinB
    Member
    Plugin Author

    Posted 1 year ago #

    However one more oddity to the case: I noticed that the related taxonomy needs at least one term to make the posts visible. If the taxonomy is empty, nothing is listed.

    I finally found this one. Fixed in the updated development version (1.3.58-dev).

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic