WordPress.org

Ready to get started?Download WordPress

Forums

Potential Bug... Trash Functionality Difference (1 post)

  1. jpbellona
    Member
    Posted 2 years ago #

    Bug testing a custom blog build, but I may have located a bug. Not quite sure, so I want to ask if anyone else has the same issues.

    Background:
    *The blog has different users, with different roles.
    *Issue occurs on trash page of a custom post type (post status = trash .../edit.php?post_status=trash&post_type=subject)
    *Trash contains posts by both an admin role (who can add/edit/delete all custom posts) and an author role (who can add/edit/delete his/her own posts).
    *Logged in as an author.
    *Using Capability Manager Plug-in.
    *Issue is specific to behavior after normal WP-error is thrown.

    Issue:
    Different functionality occurs between using the Bulk Actions (Delete Permanently) > "Apply" button and the "Empty Trash" button, after a normal WP error is thrown. In the first case (Bulk Actions > Apply), after I return from the error page and refresh the Trash page, all of the selected author pages have been deleted. No admin pages have been deleted.
    In the second case ("Empty Trash"), after I return from the error page and refresh the Trash page, all of the selected author pages have NOT been deleted. No admin pages have been deleted.

    Behavior:
    1a. When I am logged in as an author and I highlight posts by both author and admin, and I attempt to delete using Bulk Actions (Delete Per.) > "Apply", I receive the WordPress error "You are not allowed to delete this item."
    1b. When I am logged in as an author and I highlight posts by both author and admin, and I attempt to delete using "Empty Trash" button, I receive the WordPress error "You are not allowed to delete this item."
    2. I hit back on the browser, and return to the Trash page.
    3. I refresh the page (also tested moving away from Trash page, and returning).

    Question, because the same text/error is thrown for both buttons, why is the functionality different? Both single functions seem appropriate, however, having both functions exist together instead of picking one behavior seems problematic.

    I understand that my issue may be related to using custom roles and custom post types, and not the WP core, which is why I am posting here. Anyone else encounter this?

Topic Closed

This topic has been closed to new replies.

About this Topic