Opened 5 weeks ago
Closed 6 days ago
#63561 closed enhancement (fixed)
The media upload button is not disabled when no image has been uploaded
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 6.9 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Media | Keywords: | has-patch commit |
Focuses: | ui, administration | Cc: |
Description
This issue only occurs when the "old image uploader" is used e.q. Browser upload and not with the multi-file uploader. See attached screenshot.
Attachments (1)
Change History (13)
This ticket was mentioned in PR #8966 on WordPress/wordpress-develop by @ocean90.
5 weeks ago
#1
- Keywords has-patch added
@karinchristen commented on PR #8966:
5 weeks ago
#2
UX is much better now!
@stefan.velthuys commented on PR #8966:
5 weeks ago
#3
I agree, UX is definitely improved 👍
#4
@
5 weeks ago
- Milestone changed from Awaiting Review to 6.9
- Owner set to joedolson
- Status changed from new to accepted
#7
@
3 weeks ago
Reproduction Report
Description
This report validates whether the issue described in the ticket can be reproduced.
Specifically, when using the browser uploader in the Media Library (via Media → Add New → browser uploader), the Upload button remains active even if no file has been selected.
Environment
- WordPress: 6.9-alpha-60093-src
- PHP: 8.2.28
- Server: nginx/1.27.5
- Database: mysqli (Server: 8.4.5 / Client: mysqlnd 8.2.28)
- Browser: Chrome 137.0.0.0
- OS: Linux
- Theme: Twenty Twenty-Five 1.2
- MU Plugins: None activated
- Plugins:
- Query Monitor 3.18.0
- Test Reports 1.2.0
- Transients Manager 2.0.7
Actual Results
- ✅ Error condition occurs (reproduced).
- Navigated to
Media → Add New
. - Switched to browser uploader.
- Clicked the Upload button without selecting a file.
- Result: Redirected to a
wp_die()
error page due to missing upload file.
- Navigated to
Additional Notes
- The Upload button is not disabled when no file is selected.
- Clicking it without selecting a file results in a server-side error instead of being blocked on the client side.
- This could be confusing for users expecting a disabled button until a file is chosen.
Supplemental Artifacts
Classic browser uploader for single file. You can see in this screenshot on where you can find it.
The single file upload page. You can see that the button is not disable by default, or when the file filed is empty.
If you clicked that without file uploaded, you get this old classic wp_die().
#8
@
3 weeks ago
Test Report
Description
This report validates whether the indicated patch works as expected.
Patch tested: https://github.com/WordPress/wordpress-develop/pull/8966
Environment
- WordPress: 6.9-alpha-60093-src
- PHP: 8.2.28
- Server: nginx/1.27.5
- Database: mysqli (Server: 8.4.5 / Client: mysqlnd 8.2.28)
- Browser: Chrome 137.0.0.0
- OS: Linux
- Theme: Twenty Twenty-Five 1.2
- MU Plugins: None activated
- Plugins:
- Query Monitor 3.18.0
- Test Reports 1.2.0
- Transients Manager 2.0.7
Actual Results
- ✅ Issue resolved with patch.
- Navigated to
Media → Add New → browser uploader
. - Confirmed that the Upload button is now correctly disabled when no file is selected.
- Also confirmed that if a file is selected and then upload is canceled, the Upload button reverts back to the disabled state.
- Attempting to click the button without selecting a file no longer triggers a
wp_die()
error because.. ..well you can't click it 👍 😅.
- Navigated to
Additional Notes
- To test the patch, I fetched the pull request locally using:
git fetch upstream pull/8966/head:pr-8966 && git checkout pr-8966
- The UI behavior now aligns with expected usability and accessibility.
- No regressions observed in standard media uploading or drag-and-drop functionality.
Supplemental Artifacts
After the patch: You can't click it by default
After the patch: Conditional logic is working. You can only click if you have selected a file. If you remove that, it reverts back to disabled.
Trac ticket: https://core.trac.wordpress.org/ticket/63561
This PR was created during an internal contributor day @wearerequired.