[wp-trac] [WordPress Trac] #39647: Make media upload "HTTP error." more user-helpful
WordPress Trac
noreply at wordpress.org
Fri Sep 20 09:13:23 UTC 2019
#39647: Make media upload "HTTP error." more user-helpful
-------------------------------------+---------------------------------
Reporter: mikeschroder | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future Release
Component: Media | Version: 3.4
Severity: normal | Resolution:
Keywords: needs-testing has-patch | Focuses: ui, administration
-------------------------------------+---------------------------------
Comment (by ramon fincken):
Better patch with PHP and JS this time.
Rewritten to match latest trunk.
And .. does not expose the error to the world using this (and a filter
thereafter)
{{{#!php
$sent_header = ( WP_DEBUG || ( is_user_logged_in() ) );
}}}
If you want to test this you might need to disable this in handlers.js
because it will loop forever in the current trunk versioning @azaozz
{{{
// If the file is an image and the error is HTTP
500 try to create sub-sizes again.
if ( status === 500 && isImage ) {
tryAgain( up, error );
return;
}
}}}
More info on that in ticket #47872
https://core.trac.wordpress.org/attachment/ticket/47872/47872.diff
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39647#comment:33>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list