[wp-trac] [WordPress Trac] #19826: wp-die:: Same WP error. Two different behaviors.

WordPress Trac wp-trac at lists.automattic.com
Fri Jan 13 18:38:01 UTC 2012


#19826: wp-die:: Same WP error. Two different behaviors.
--------------------------+--------------------------------------
 Reporter:  jpbellona     |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Trash         |    Version:  3.1.2
 Severity:  minor         |   Keywords:  ui-feedback dev-feedback
--------------------------+--------------------------------------
 Bug testing a custom blog build, but I may have located a bug with core
 (wp-die) Trash error messages.

 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. (Tested bug without plugin too)
 *Issue is specific to behavior after normal WP-error is thrown.

 Issue:
 Same WP error. Two different behaviors.

 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 [1a below]),
 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" [1b below]), 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." ///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.

 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." ///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.

 returning to the Trash page. Tested both scenarios.
 1. I hit back on the browser, and return to the Trash page. I refresh the
 page.
 2. Move to a different WP admin page, not the Trash page, then return to
 the Trash page.

 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.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/19826>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list