Skip to content
This repository was archived by the owner on Nov 4, 2024. It is now read-only.
This repository was archived by the owner on Nov 4, 2024. It is now read-only.

Undefined property notice when saving Custom CSS when this plugin is active in Pressbooks #12

Description

@SteelWagstaff

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

  1. Open a book on a Pressbooks network with WP_DEBUG set to true and the Candela Citations plugin active and click Appearance -> Custom Styles
  2. Save a change to the CSS
  3. Observe a white screen briefly displaying the notice indicated above before you're returned to the Pressbooks interface
candela_permission_error.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 pressbooks/pressbooks#2149

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions