Album post type registration error
-
Hi
Fairly new to this plugin, but I’m getting this message in my error log when I work with the Album extension.PHP Notice: Function map_meta_cap was called <strong>incorrectly</strong>. The post type foogallery-album is not registered, so it may not be reliable to check the capability "edit_post" against a post of that type. 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 4.4.0.) in /var/www/<snip>/gallery/wp-includes/functions.php on line 5831
-
Hi @muttznutz,
Thanks for alerting us to this.
The PHP notice you have shared with us is a PHP warning message which is a built-in method of debugging that was added by WordPress for developers.
The purpose of these warning messages is to help developers debug issues with their code. Plugin and theme developers need this information to check for compatibility and best practices.
Fortunately, PHP Notices and warning messages such as these are the kinds of errors that do not stop WordPress, themes, or plugins from loading your website and thus cannot break your site, and so do not be worried about something like that happening. You can disable debugging to prevent this message from being displayed on the frontend if it is a live site.
With all of that said, the development team has been made aware of this warning message and will work on an update that will have a fix that will resolve the underlying issue.
Hope this clarifies this issue for you.
Lastly, to assist us further, could you kindly share the page displaying the notice message and list the actions/steps you carried out that triggered the error so that we can try to replicate it from our end? Thanks in advance for doing so.
Kind regards,
Elvis.Thanks, Elvis @elviiso
I understand about warning messages, but leave them switched on – they can be a useful ‘canary’ for problems with my theme.The page is in my admin area, so it’s not something that’s shareable, I’m afraid.
However, it’s the basic “Add Album” dashboard option that generates it.In terms of the process :
I created an album, named it, and added 25 galleries, dragging them to change the sequence.
During the time I was editing it, 9 instances of the error were generated (so I’d speculate that it may be generated on “autosave”).
Here are the errors. They’re all the same, but you’ll see that they’re distributed therough the time I was editing, rather than in a single event.[06-Jun-2022 20:16:43 UTC] PHP Notice: Function map_meta_cap was called <strong>incorrectly</strong>. The post type foogallery-album is not registered, so it may not be reliable to check the capability "edit_post" against a post of that type. 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 4.4.0.) in /var/www/vhosts/<snip>/wp-includes/functions.php on line 5831 [06-Jun-2022 20:16:59 UTC] PHP Notice: Function map_meta_cap was called <strong>incorrectly</strong>. The post type foogallery-album is not registered, so it may not be reliable to check the capability "edit_post" against a post of that type. 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 4.4.0.) in /var/www/vhosts/<snip>/wp-includes/functions.php on line 5831 [06-Jun-2022 20:17:14 UTC] PHP Notice: Function map_meta_cap was called <strong>incorrectly</strong>. The post type foogallery-album is not registered, so it may not be reliable to check the capability "edit_post" against a post of that type. 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 4.4.0.) in /var/www/vhosts/<snip>/wp-includes/functions.php on line 5831 [06-Jun-2022 20:17:28 UTC] PHP Notice: Function map_meta_cap was called <strong>incorrectly</strong>. The post type foogallery-album is not registered, so it may not be reliable to check the capability "edit_post" against a post of that type. 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 4.4.0.) in /var/www/vhosts/<snip>/wp-includes/functions.php on line 5831 [06-Jun-2022 20:17:43 UTC] PHP Notice: Function map_meta_cap was called <strong>incorrectly</strong>. The post type foogallery-album is not registered, so it may not be reliable to check the capability "edit_post" against a post of that type. 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 4.4.0.) in /var/www/vhosts/<snip>/wp-includes/functions.php on line 5831 [06-Jun-2022 20:17:59 UTC] PHP Notice: Function map_meta_cap was called <strong>incorrectly</strong>. The post type foogallery-album is not registered, so it may not be reliable to check the capability "edit_post" against a post of that type. 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 4.4.0.) in /var/www/vhosts/<snip>/wp-includes/functions.php on line 5831 [06-Jun-2022 20:18:14 UTC] PHP Notice: Function map_meta_cap was called <strong>incorrectly</strong>. The post type foogallery-album is not registered, so it may not be reliable to check the capability "edit_post" against a post of that type. 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 4.4.0.) in /var/www/vhosts/<snip>y/wp-includes/functions.php on line 5831 [06-Jun-2022 20:18:28 UTC] PHP Notice: Function map_meta_cap was called <strong>incorrectly</strong>. The post type foogallery-album is not registered, so it may not be reliable to check the capability "edit_post" against a post of that type. 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 4.4.0.) in /var/www/vhosts/<snip>/wp-includes/functions.php on line 5831 [06-Jun-2022 20:18:50 UTC] PHP Notice: Function map_meta_cap was called <strong>incorrectly</strong>. The post type foogallery-album is not registered, so it may not be reliable to check the capability "edit_post" against a post of that type. 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 4.4.0.) in /var/www/vhosts/<snip>/wp-includes/functions.php on line 5831 [06-Jun-2022 20:19:11 UTC] PHP Notice: Function map_meta_cap was called <strong>incorrectly</strong>. The post type foogallery-album is not registered, so it may not be reliable to check the capability "edit_post" against a post of that type. 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 4.4.0.) in /var/www/vhosts/<snip>/wp-includes/functions.php on line 5831I subsequently went in to edit the album, and the messages were generated for as long as the album was open, even if I wasn’t changing anything.
Hope this helps,
DrewHi @muttznutz
Thanks for the extra info, we really appreciate it.
I have been trying to replicate this from my end using the steps you’ve shared but I’ve been unable to during my initial investigations. With that said, we’ll continue to look into this. @bradvin kindly have a look at this. Thanks.
Kind regards,
Elvis.
The topic ‘Album post type registration error’ is closed to new replies.