Opened 6 years ago
Closed 6 years ago
#44864 closed defect (bug) (fixed)
4.9.8 breaks REST API attachment uploads on Multisite
Reported by: | JakePT | Owned by: | rachelbaker |
---|---|---|---|
Milestone: | 5.0 | Priority: | normal |
Severity: | critical | Version: | 4.9.8 |
Component: | REST API | Keywords: | has-patch commit |
Focuses: | rest-api | Cc: |
Description
[43462] seems to have broken attachment uploads over the REST API in Multisite. This appears to be causing issues for people using Gutenberg:
https://github.com/WordPress/gutenberg/issues/9134
https://github.com/WordPress/gutenberg/issues/9142
When attempting to upload an image this error is occurring:
Call to undefined function upload_is_user_over_quota() in /PATH/TO/FOLDER/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php:808
The new check_upload_size()
method of WP_REST_Attachments_Controller
uses the upload_is_user_over_quota()
function, however this function is part of wp-admin/includes/ms.php
which is only loaded in the admin and doesn't appear to be loaded on REST requests.
Attachments (1)
Change History (8)
#1
@
6 years ago
- Milestone changed from Awaiting Review to 4.9.9
- Summary changed from 4.9.8 breaks REST AI attachment uploads on Multisite to 4.9.8 breaks REST API attachment uploads on Multisite
Note: See
TracTickets for help on using
tickets.
Require wp-admin/includes/ms.php