[wp-trac] [WordPress Trac] #44864: 4.9.8 breaks REST AI attachment uploads on Multisite

WordPress Trac noreply at wordpress.org
Thu Aug 30 10:30:18 UTC 2018


#44864: 4.9.8 breaks REST AI attachment uploads on Multisite
--------------------------+-----------------------------
 Reporter:  JakePT        |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  REST API      |    Version:  4.9.8
 Severity:  critical      |   Keywords:
  Focuses:  rest-api      |
--------------------------+-----------------------------
 [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.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/44864>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list