Opened 8 months ago
Last modified 4 weeks ago
#60074 accepted defect (bug)
Add New Media File > The ''dismiss button ''not showing any response when uploading the unsupported (.jfif) file
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 6.7 | Priority: | normal |
Severity: | normal | Version: | 6.4.2 |
Component: | Media | Keywords: | has-patch |
Focuses: | Cc: |
Description
Description
The dismiss button is not working when uploading the not allowed file type ( .jfif file)
Environment
- WordPress: 6.4.2
- PHP: 8.2.4
- Server: Apache/2.4.56 (Win64) OpenSSL/1.1.1t PHP/8.2.4
- Database: mysqli (Server: 10.4.28-MariaDB / Client: mysqlnd 8.2.4)
- Browser: Chrome 119.0.0.0 (Windows 10/11)
- Theme: Twenty Twenty-Four 1.0
- Plugins:
- WordPress Beta Tester 3.5.4
Steps to Reproduce
- Select the Add New Media File option from the Media menu
- Upload the .jfif file
- click the Dismiss option
- No response showing when clicked
Expected Results
The dismiss pop-up should be disable when clicking on the Dismiss button
Actual Results
No response was showing when clicked on the Dismiss button
Video attached :
https://www.loom.com/share/9130cd6cc58b48a8aae66849dc11670f
Attachments (5)
Change History (22)
#1
@
8 months ago
i was able to reproduce this issue.
Environment
- WordPress: 6.4.2
- PHP: 7.4.21
- Server: Apache/2.4.46 (Unix) OpenSSL/1.0.2u PHP/7.4.21 mod_wsgi/3.5 Python/2.7.18 mod_fastcgi/mod_fastcgi-SNAP-0910052141 mod_perl/2.0.11 Perl/v5.30.1
- Database: mysqli (Server: 5.7.34 / Client: mysqlnd 7.4.21)
- Browser: Chrome 119.0.0.0 (macOS)
- Theme: Twenty Twenty-Three 1.3
- MU-Plugins: None activated
- Plugins:
- WordPress Beta Tester 3.5.2
#2
@
8 months ago
Hey @mijotj - thanks for the patch - I will give it a test.
I noticed your patch actually removes some inline JavaScript and I'm curious why do you think that fixes the issue? It might be worth seeing why that inline JS was added originally.
#3
@
8 months ago
I tested the patch, and it appears that the issue is resolved.
Environment
- WordPress: 6.4.2
- PHP: 7.4.21
- Server: Apache/2.4.46 (Unix) OpenSSL/1.0.2u PHP/7.4.21 mod_wsgi/3.5 Python/2.7.18 mod_fastcgi/mod_fastcgi-SNAP-0910052141 mod_perl/2.0.11 Perl/v5.30.1
- Database: mysqli (Server: 5.7.34 / Client: mysqlnd 7.4.21)
- Browser: Firefox 120.0 (macOS)
- Theme: Twenty Twenty-Three 1.3
- MU-Plugins: None activated
- Plugins:
- WordPress Beta Tester 3.5.5
#4
follow-up:
↓ 5
@
8 months ago
Although the current patch fixes the issue, the button is being changed to a link and I found that it was previously changed from a link to a button for accessibility reasons, see https://github.com/WordPress/wordpress-develop/commit/ef84e589d2bc25952bee31940a5a11c3fa75f599
For this reason, I don't think we should make the fix as proposed, can we find a different fix that maintains the semantic button element?
I agree we should remove the inline JavaScript anyway I believe it is being stripped already. Can we expand the existing JS handler to correctly handle the button click?
#5
in reply to:
↑ 4
@
8 months ago
Replying to adamsilverstein:
Thank you for testing my patch. I am uploading a new patch as per your suggestion.
#6
@
8 months ago
- Keywords has-patch added; needs-patch removed
I tested the new patch as well, and it appears that the issue is resolved.
Before applying the patch: https://www.loom.com/share/e5e58cef24ce49049aacd66bdd3fdf76
After applying the patch: https://www.loom.com/share/04a0850967354c4691ebbc49bdfe1b53
Environment
- WordPress: 6.4.2
- PHP: 7.4.21
- Server: Apache/2.4.46 (Unix) OpenSSL/1.0.2u PHP/7.4.21 mod_wsgi/3.5 Python/2.7.18 mod_fastcgi/mod_fastcgi-SNAP-0910052141 mod_perl/2.0.11 Perl/v5.30.1
- Database: mysqli (Server: 5.7.34 / Client: mysqlnd 7.4.21)
- Browser: Firefox 120.0 (macOS)
- Theme: Twenty Twenty-Three 1.3
- MU-Plugins: None activated
- Plugins:
- WordPress Beta Tester 3.5.5
#7
@
8 months ago
- Keywords needs-patch added; has-patch removed
@mijotj - that is much closer and what I though about trying at first as well. Unfortunately the plupload code (and everything in that vendor file) are upstream dependencies - meaning they are pulled in during our build file and we can't edit them directly - the changes would be overwritten during the build.
I guess because we can't edit that file, we can't depend on it closing the error. Therefore we need to put the handler somewhere else. since we only use this when an error shows and its a tiny snippet, inlining it seems appropriate.
The current code seems to be stripping the html added to the tag, maybe we can just add it immediately after the tag?
#8
follow-up:
↓ 12
@
8 months ago
- Owner set to adamsilverstein
- Status changed from new to assigned
60074.3.diff is a start, however the selector may be too broad?
#9
@
8 months ago
On a separate note, should we consider adding support for uploading ".jfif" files (so you don't get the error in the first place)? do all the browsers support them? what about GD or Imagick. First time I have seen this format used, does it offer specific advantages?
#10
@
8 months ago
@adamsilverstein , this issue isn't specific to ".jfif". It happens whenever someone tries to upload unsupported files. I'm trying to fix it.
#11
@
8 months ago
@adamsilverstein , this issue isn't specific to ".jfif". It happens whenever someone tries to upload unsupported files. I'm trying to fix it.
Yes, I get that we need to fix the dismiss notice not closing. I was wondering separately about the jfif
format and whether we should support it (this would require a separate ticket).
#12
in reply to:
↑ 8
@
8 months ago
Replying to adamsilverstein:
I tested this patch as well, and it is working very well.
This ticket was mentioned in PR #5772 on WordPress/wordpress-develop by @adamsilverstein.
8 months ago
#13
- Keywords has-patch added; needs-patch removed
Trac ticket:
This ticket was mentioned in Slack in #core-media by joedolson. View the logs.
4 months ago
#15
follow-up:
↓ 16
@
4 weeks ago
- Milestone changed from Awaiting Review to 6.7
Milestoning this for 6.7. If you don't have time for it @adamsilverstein, I can take ownership.
Uploaded (.jfif) file