Opened 8 weeks ago
Last modified 8 weeks ago
#65374 new enhancement
Clarify the "invalid_filetype" upload error message
| Reported by: | thorr19 | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | General | Version: | trunk |
| Severity: | minor | Keywords: | has-patch |
| Cc: | Focuses: |
Description
The invalid_filetype error string in wp_default_scripts()
(
src/wp-includes/script-loader.php) currently reads:
"This file cannot be processed by the web server."
This implies a server fault when the actual cause is that
WordPress does not accept the file's MIME type. The wording
is also inconsistent with neighboring strings in the same
$uploader_l10narray, which all explain the cause and
suggest an action:
zero_byte_file: "This file is empty. Please try another."not_an_image: "This file is not an image. Please try another."
Proposed change:
"This file type is not supported. Please try another."
This pattern-matches the surrounding strings, removes the
misleading "web server" framing, and tells the user what to
do next.
See also: #61361, which addressed the analogous image-specific
wording (noneditable_image) for the same reason. The
invalid_filetypemessage was not touched in that ticket but
suffers the same vagueness.
A PR with this change is in flight on GitHub and will be linked
once opened.
Change History (2)
This ticket was mentioned in PR #12017 on WordPress/wordpress-develop by TPilgs.
8 weeks ago
#1
- Keywords has-patch added
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
## Trac ticket
https://core.trac.wordpress.org/ticket/65374
## Summary
The
invalid_filetypeerror string inwp_default_scripts()(src/wp-includes/script-loader.php) currently reads:This implies a server fault when the actual cause is that WordPress does not accept the file's MIME type. The wording is also inconsistent with neighboring strings in the same
$uploader_l10narray, which all explain the cause and suggest an action:zero_byte_file: _"This file is empty. Please try another."_not_an_image: _"This file is not an image. Please try another."_Proposed change:
This pattern-matches the surrounding strings, removes the misleading "web server" framing, and tells the user what to do next.
## Related
See also Trac #61361, which made the analogous wording improvement to the image-specific
noneditable_imagemessage for the same reason. Theinvalid_filetypestring was not touched in that ticket but suffers the same vagueness.