[wp-trac] [WordPress Trac] #22041: Importer dies silently when multisite upload limit is reached

WordPress Trac noreply at wordpress.org
Thu Feb 27 19:51:54 UTC 2014


#22041: Importer dies silently when multisite upload limit is reached
-----------------------------+-----------------------------
 Reporter:  danielbachhuber  |       Owner:
     Type:  enhancement      |      Status:  new
 Priority:  normal           |   Milestone:  Future Release
Component:  Import           |     Version:
 Severity:  normal           |  Resolution:
 Keywords:  needs-patch      |     Focuses:  multisite
-----------------------------+-----------------------------

Comment (by danielbachhuber):

 I tried to reproduce this morning and couldn't. As far as I can tell, the
 import process gets no where near `is_upload_space_available()`.

 The rundown is this:

 * In `WP_Importer::process_attachment()`, the importer calls
 `WP_Importer::fetch_remote_file()` to pull down the remote file.
 `::process_attachment()` also calls `wp_insert_attachment()`, but that
 just performs the database interaction.
 * `WP_Importer::fetch_remote_file()` uses `wp_upload_bits()` to create an
 empty file, and then `wp_get_http()` to write the contents of the remote
 file to the local file.
 * `WP_Importer::fetch_remote_file()`also checks against
 `WP_Importer::max_attachment_size()`, which is filterable and defaults to
 0. I wish I had reported which environment I experienced this in, because
 this may have been the cause of the bug I saw.

 Based on my debugging today, this ticket could become that the importer
 should respect the blog's max storage limit value.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/22041#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list