Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"map_meta_cap was called incorrectly. The post type part is not registered... " #7

Open
rootl opened this issue Mar 4, 2019 · 1 comment

Comments

@rootl
Copy link

rootl commented Mar 4, 2019

Notice: map_meta_cap was called incorrectly. The post type part is not registered, so it may not be reliable to check the capability "edit_page" against a post of that type. Please see Debugging in WordPress for more information. (This message was added in version 4.4.0.) in /var/www/html/[ourpressbooksinstall]/wp-includes/functions.php on line 4667

When attempting to create a new book, this error message shows when Candela-Citation is active. Error is not generated when this plugin is inactive.

WordPress Configuration

Network URL: http://milnepublishing.geneseo.edu/
Network Type: Subdirectory
Version: 5.1
Language: en_US
WP_ENV: Not set
WP_DEBUG: Enabled
Memory Limit: 64M

Pressbooks Configuration

Version: 5.6.5
Root Theme: Aldine
Root Theme Version: 1.5.0

Pressbooks Dependencies

Epubcheck: Installed
Kindlegen: Installed
xmllint: Installed
PrinceXML: Installed
Saxon-HE: Installed

Must-Use Plugins

Global SMTP: 1.0
hm-autoloader.php: n/a
WP Multisite Allow Hyphens and Underscores Override Admin: 1.0
WP Pressbooks Allow Prince 300dpi Images: n/a

Network Active Plugins

Candela Citation: 0.2.2
Check Email: 0.5.5
Disable Comments: 1.9.0
GitHub Updater: 8.7.0
Hypothesis: 0.5.0
iframe: 4.4
Openstax Import for Pressbooks: 1.3.2
Pressbooks: 5.6.5
Textbooks for Pressbooks: 4.2.3
UpdraftPlus - Backup/Restore: 2.16.6.24
WordPress Mass Email to users: 1.1
WP-Optimize: 2.2.12
WP QuickLaTeX: 3.8.6

Server Configuration

PHP Version: 7.3.1
MySQL Version: 5.6.42
Webserver Info: Apache/2.4.6 () OpenSSL/1.0.2k-fips PHP/7.3.1

@SteelWagstaff
Copy link
Contributor

SteelWagstaff commented Jun 9, 2021

@kalendar we've noticed the same problem/behavior on test installations of Pressbooks with Candela Citations is installed and is either a) network activated or b) activated on the network root site. The warning does not appear when the plugin is deactivated. See video below:

map_meta_cap_candela_citation_error.mp4

We suspect this may be because this plugin is attempting to register its own custom post type before the Pressbooks custom post types have been registered, though I'm not certain as I'm not deeply familiar with how this plugin was written. Hopefully fairly easy for you all to debug and fix? If you can direct me to the code maintainer there at Lumen, we may also be able to help investigate and provide a PR ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants