Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error message isn't displayed on media upload failure #7372

Closed
danielbachhuber opened this issue Jun 19, 2018 · 2 comments
Closed

Error message isn't displayed on media upload failure #7372

danielbachhuber opened this issue Jun 19, 2018 · 2 comments
Assignees
Labels
[Feature] Media Anything that impacts the experience of managing media [Type] Bug An existing feature does not function as intended
Milestone

Comments

@danielbachhuber
Copy link
Member

Describe the bug

When I try to upload an image and the upload fails for some reason at the server level, the generic Error while uploading file %s to the media library. error message isn't displayed.

noerror

To Reproduce

Include this snippet locally to force upload failures:

$force_upload_failure = function( $file ) {
	$file['error'] = 'This file upload has been forced to fail.';
	return $file;
};
add_filter( 'wp_handle_sideload_prefilter', $force_upload_failure );
add_filter( 'wp_handle_upload_prefilter', $force_upload_failure );

Attempt to upload a media file and see that there isn't an error message.

@danielbachhuber danielbachhuber added [Type] Bug An existing feature does not function as intended [Feature] Media Anything that impacts the experience of managing media labels Jun 19, 2018
@danielbachhuber danielbachhuber added this to the 3.1 milestone Jun 19, 2018
@danielbachhuber
Copy link
Member Author

#6957 is a likely candidate.

@eriktdesign
Copy link

This still seems to occur when uploading files with a "Media & Text" block

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Media Anything that impacts the experience of managing media [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

3 participants