Opened 6 years ago
Closed 5 years ago
#52205 closed defect (bug) (fixed)
REST API: Plugins Controller single plugin route fatal errors on multisite
| Reported by: | TimothyBlynJacobs | Owned by: | TimothyBlynJacobs |
|---|---|---|---|
| Priority: | normal | Milestone: | 5.6.1 |
| Component: | REST API | Version: | 5.5 |
| Severity: | normal | Keywords: | good-first-bug has-patch fixed-major |
| Cc: | Focuses: | rest-api |
Description
On multisite, trying to GET the single plugin endpoint, for example wp/v2/plugins/hello, fatal errors because is_network_only_plugin is not defined. This also effects the delete endpoint.
Due to how the collection route and installation routes are structured, they don't run into this issue. To fix this, I think we should add require_once ABSPATH . 'wp-admin/includes/plugin.php'; to the top of check_read_permission to make sure all our bases are covered.
Attachments (1)
Change History (6)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
This wasn't introduced in 5.6 but it's a good candidate for a patch release. Moving to 5.6.1.
Thanks for the patch @oakesjosh .