Opened 12 years ago
Last modified 5 years ago
#22041 reopened enhancement
Importer dies silently when multisite upload limit is reached
Reported by: | danielbachhuber | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Import | Keywords: | needs-patch needs-testing |
Focuses: | multisite | Cc: |
Description
The scenario: You're importing a WXR file into a site on a multisite network and the WXR includes a number of large attachments. For whatever reason, the upload capacity for each site is set at 100MB.
If the upload capacity is reached during the import process, the import will look like it's hanging forever. Instead, it would be nice to show an alert that the upload capacity was reached or similar.
Change History (8)
#2
@
11 years ago
- Focuses multisite added
- Keywords needs-patch added
- Milestone changed from WordPress.org to Future Release
#3
follow-up:
↓ 8
@
11 years ago
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 callsWP_Importer::fetch_remote_file()
to pull down the remote file.::process_attachment()
also callswp_insert_attachment()
, but that just performs the database interaction. WP_Importer::fetch_remote_file()
useswp_upload_bits()
to create an empty file, and thenwp_get_http()
to write the contents of the remote file to the local file.WP_Importer::fetch_remote_file()
also checks againstWP_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.
#5
@
9 years ago
- Milestone WordPress.org deleted
- Resolution set to wontfix
- Status changed from new to closed
Closing as wontfix based on comment:3 and the complete lack of interest on the ticket over the last 2 years. Feel free to reopen when more interest re-emerges (particularly if there's a patch)
This ticket was mentioned in Slack in #core by danielbachhuber. View the logs.
9 years ago
#7
@
9 years ago
- Keywords needs-testing added
- Milestone set to WordPress.org
- Resolution wontfix deleted
- Status changed from closed to reopened
This ticket needs some more investigation before we can close it. I have a suspicion there is a sneaky bug in there somewhere and will take some time for someone to dig in and confirm (or un-confirm).
#8
in reply to:
↑ 3
@
9 years ago
Replying to 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()
.
Perhaps the problem isn't the upload limit, but PHP's memory limit. If there's a file which is bigger than the memory limit, then fetching that file in wp_get_http()
will fail because the HTTP response from the remote server is stored in memory before the file content is extracted and written to the hard disk.
I haven't verified yet, but fixing this makes sense if it's still a present issue.
Would this be the import plugin's job or is there something we can do to throw the notice in core?