[wp-trac] [WordPress Trac] #16847: Capability check fails for custom post type revision edit (& map_meta_cap no good) (was: Capability check fails for custom post type revision edit)
WordPress Trac
wp-trac at lists.automattic.com
Wed Aug 31 07:12:43 UTC 2011
#16847: Capability check fails for custom post type revision edit (& map_meta_cap
no good)
-------------------------------+------------------------------
Reporter: anmari | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Role/Capability | Version: 3.3
Severity: minor | Resolution:
Keywords: reporter-feedback |
-------------------------------+------------------------------
Changes (by anmari):
* version: 3.1 => 3.3
Comment:
Hi,
added 'map_meta_cap' => true, to the post_type registration
Number of things then happen (latest nightly build and 3.2.1):
1) edit, and quick edit and trash links on custom post type manage screen
dissappears (only have view) - take out the map_meta_cap and at least I
can edit.
2) Bunch of notices on every edit screen which seem to relate to the fact
that a 'null' post is picked up initially
Notice: Trying to get property of non-object in C:\web\wpbeta\wp\wp-
includes\capabilities.php on line 992
{{{
$post = get_post( $args[0] );
if ( 'revision' == $post->post_type ) {
}}}
Notice: Trying to get property of non-object in C:\web\wpbeta\wp\wp-
includes\capabilities.php on line 996
Notice: Trying to get property of non-object in C:\web\wpbeta\wp\wp-
includes\capabilities.php on line 998
Notice: Trying to get property of non-object in C:\web\wpbeta\wp\wp-
includes\capabilities.php on line 999
Notice: Trying to get property of non-object in C:\web\wpbeta\wp\wp-
includes\capabilities.php on line 999
Notice: Trying to get property of non-object in C:\web\wpbeta\wp\wp-
includes\capabilities.php on line 1002
Notice: Trying to get property of non-object in C:\web\wpbeta\wp\wp-
includes\capabilities.php on line 1002
--
Ticket URL: <http://core.trac.wordpress.org/ticket/16847#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list