Title: Function map_meta_cap was called incorrectly
Last modified: November 22, 2022

---

# Function map_meta_cap was called incorrectly

 *  Resolved [xtrabytes](https://wordpress.org/support/users/xtrabytes/)
 * (@xtrabytes)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/function-map_meta_cap-was-called-incorrectly/)
 * Throws error since WP 6.1.1
 * `Function map_meta_cap was called <strong>incorrectly</strong>. When checking
   for the <code>edit_post</code> capability, you must always check it against a
   specific post. Please see <a href="https://wordpress.org/support/article/debugging-
   in-wordpress/">Debugging in WordPress</a> for more information. (This message
   was added in version 6.1.0.) {"exception":"[object] (ErrorException(code: 0):
   Function map_meta_cap was called <strong>incorrectly</strong>. When checking 
   for the <code>edit_post</code> capability, you must always check it against a
   specific post. Please see <a href=\"https://wordpress.org/support/article/debugging-
   in-wordpress/\">Debugging in WordPress</a> for more information. (This message
   was added in version 6.1.0.) at /home/storm/sites/pinchofnom-com/public_html/
   wp-includes/functions.php:5835)`

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Support [Gerard Blanco](https://wordpress.org/support/users/sixaxis/)
 * (@sixaxis)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/function-map_meta_cap-was-called-incorrectly/#post-16225820)
 * Hi [@xtrabytes](https://wordpress.org/support/users/xtrabytes/),
 * When does that message appear? After doing what action? Can you perhaps send 
   us a screen recording?
 * Also, does it happen when Enable Media Replace is deactivated?
 * Thank you,
 *  Plugin Author [Pedro](https://wordpress.org/support/users/petredobrescu/)
 * (@petredobrescu)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/function-map_meta_cap-was-called-incorrectly/#post-16226414)
 * Hello [@xtrabytes](https://wordpress.org/support/users/xtrabytes/),
 * This issue should be addressed and fixed in version 4.0.1, which was just released.
 * Thanks for reporting this!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Function map_meta_cap was called incorrectly’ is closed to new replies.

 * ![](https://ps.w.org/enable-media-replace/assets/icon-256x256.png?rev=1940728)
 * [Enable Media Replace](https://wordpress.org/plugins/enable-media-replace/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/enable-media-replace/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/enable-media-replace/)
 * [Active Topics](https://wordpress.org/support/plugin/enable-media-replace/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/enable-media-replace/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/enable-media-replace/reviews/)

 * 2 replies
 * 3 participants
 * Last reply from: [Pedro](https://wordpress.org/support/users/petredobrescu/)
 * Last activity: [3 years, 6 months ago](https://wordpress.org/support/topic/function-map_meta_cap-was-called-incorrectly/#post-16226414)
 * Status: resolved