Open SteelWagstaff opened 3 years ago
I don't know how this plugin works very well yet, but did notice that the plugin contains a 'save' function which attempts to check whether current_user_can permissions allow them to edit_page for a specific post_id: https://github.com/lumenlearning/candela-citation/blob/083e08aee1865de935e9f0240ba1707460df3b6d/inc/class-citation.php#L430-L432.
Description On the Pressbooks network with WP_DEBUG set to true, we see an
Undefined property: stdClass::$edit_page in /srv/www/integrations.pressbooks.network/releases/20210427183011/web/wp-includes/capabilities.php on line 172
notice whenever we save Custom CSS if this plugin is active.Steps to Reproduce
https://user-images.githubusercontent.com/13485451/121606521-263a4e00-ca03-11eb-87a2-6f5f7f8ac36f.mp4
Expected behavior: No notice is displayed
Actual behavior: A notice is diplayed.
Notes Here's the line cited by the notice: https://github.com/WordPress/WordPress/blob/267061c9595fedd321582d14c21ec9e7da2dcf62/wp-includes/capabilities.php#L172
Like #7, this issue is only present when Candela Citations is activated, and disappears when that plugin is deactivated.
More details at https://github.com/pressbooks/pressbooks/issues/2149