[wp-trac] [WordPress Trac] #25849: Better Error Messages for the Media Uploader

WordPress Trac noreply at wordpress.org
Tue Oct 7 02:08:15 UTC 2014


#25849: Better Error Messages for the Media Uploader
-------------------------+------------------------------
 Reporter:  chriscct7    |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Media        |     Version:  3.7
 Severity:  normal       |  Resolution:
 Keywords:  needs-patch  |     Focuses:
-------------------------+------------------------------

Comment (by chriscct7):

 One of the plugins I wrote lets users upload files on the frontend using
 the core WordPress Media Uploader. From our experience in support, there
 are probably at least a dozen different ways to trigger the exact same
 generic message listed above, and the only way to find the actual
 causation for the issue on a site is a very time consuming 1 by 1 crossing
 off the list of ways we know we can trigger it approach. With better error
 messages, when the error message is shown, it would let developers, users,
 and site owners know exactly what the problem is.

 Here's a partial of our list of the ways you can trigger that message:
 * lack of permissions (capabilities)
 * lack of memory (overload during upload process)
 * lack of permissions on the upload folder
 * another plugin moving the upload location using the filter to another
 place that isn't supported (permissions)
 * any sort of blocking to admin-ajax.php (extreme caching, security
 plugin, htaccess rule) when the upload tab has been defined as the default
 open to tab in JS
 * the user being logged out during the upload
 * some versions of PHP 5.2 apparently don't play nice with the uploader

 There's only 2 ways (at least that I've seen) to get a unique error
 message:
 * non-supported file type
 * filesize over upload limit

 The current error system is really frustrating to work with, as there's no
 guidance on what the error is. If an error message is to be shown, it
 should say what triggered it (even if it just wants to give us a list of
 reasons), so we have some place to start debugging.

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


More information about the wp-trac mailing list