#53917 closed defect (bug) (fixed)
Default value of WEBP images in the Classic Editor
Reported by: | almendron | Owned by: | adamsilverstein |
---|---|---|---|
Milestone: | 5.9 | Priority: | normal |
Severity: | normal | Version: | 5.8 |
Component: | Media | Keywords: | has-patch commit |
Focuses: | Cc: |
Description
To replicate the problem:
1.- Upload a WEBP image to a post with the Classic Editor. In "Link to" put "None".
2.- Save entry.
3.- Now upload another WEBP image. It is supposed that in "Link to" it should put "None", but it is not like that since "Media file" is kept. For some reason it does not save the value of the previous upload.
Also, the view scrolls down
Note: if you do the same test with a "jpg" image, then it does save the value of the last image uploaded.
Attachments (2)
Change History (21)
This ticket was mentioned in Slack in #core-media by antpb. View the logs.
3 years ago
#5
@
3 years ago
1) Tests performed on a plugin-free installation (except with https://wordpress.org/plugins/classic-editor/ )
2) JavaScript problems? No
3) Have you tried the Classic Editor?
#6
@
3 years ago
- Keywords needs-testing added; needs-patch removed
My testing process:
- Fresh install of
trunk
(WP 5.9 nightly). - Classic Editor plugin active only.
- Twenty Twenty-One theme active.
- Click add media.
- Upload WebP image.
- Select a different Link To value.
I've tried the following both before and after saving:
- Upload another WebP to the same post and a new post.
- Upload another image format (JPG) to the same and a new post.
In all instances I'm unable to reproduce. The selected Link To value persists, and I see the value reflected in the user meta settings.
Can you check what the role of the user you are testing with is?
Also to be clear, I'm not trying to say you're not seeing the issue or that it's invalid, just that I am unable to reproduce it with the information available currently. It's possible another contributor can find out what I'm missing. But that has to be determined before a fix can be created.
#7
@
3 years ago
Fresh install of trunk (WP 5.9 nightly) : Are you testing with version 5.9?
I work with version 5.8
#8
@
3 years ago
trunk
is the latest development of WordPress, which is essentially 5.8 with some newer updates that will be included in the next release (5.9).
Just to be sure, I've retested using 5.8 and I am still unable to reproduce.
When you see the behavior, are you editing posts? Pages? A custom post type? Does it happen for all of them?
#9
@
3 years ago
Post draft
1) Upload webp image. Change "Link to" -> "none"
2) Insert image and save draft
3) Upload webp image. "Link to" automatically changes to "Media file"
This does not happen with "alignment" and "size". They keep the values of the last uploaded image.
1) Upload jpg image. Change "Link to" -> "none"
2) Insert image and save draft
3) Upload jpg image. "Link to" it does not change. Is "none"
#10
@
3 years ago
When you see the behavior,
are you editing posts? Pages? posts and pages
A custom post type? NO
Does it happen for all of them? Yes
#11
@
3 years ago
Hi,
After checking it, the problem is in the isImageAttachment
function that checks if it is an image and the webp extension is not defined.
#13
@
3 years ago
Hi @desrosj @antpb
I have spoken with several colleagues from "WordPress Spain" and they can all reproduce the problem.
@kallookoo , for example, has observed the problem and found the reason that one of the fields (Link to) is invariable. In less than 5 minutes, he has found the solution.
Can you change the value of "Milestone" so that the solution will be added in the next revision?
This ticket was mentioned in PR #1838 on WordPress/wordpress-develop by adamsilverstein.
3 years ago
#16
Trac ticket: https://core.trac.wordpress.org/ticket/53917
#17
@
3 years ago
- Keywords commit added
@almendron thanks for follow up here and the additional clarification of steps to reproduce. I was able to reproduce the issue as you described (the last link to type was not being used for webp images - after the patch is is). This seems worth fixing since you confirmed it is affecting users.
@kallookoo - thanks for confirming the issue on your end as well and for the patch, that looks good.
hellofromtonya commented on PR #1838:
3 years ago
#19
Committed via https://core.trac.wordpress.org/changeset/52073.
Hi @almendron,
Thank you for this report, and welcome to Trac!
I've been trying to reproduce this, but it seems to be working as expected for me. I've tried several combinations of saving, inserting/uploading various image formats, and using different link options.
Can you check if you're able to reproduce with a fresh install? Or on the same install with no plugins active? Also, can you check your console for any JavaScript problems?
I'm going to kick this back to
Awaiting Review
since the 5.8.1 RC is due out in 2 days. If someone is able to reproduce and a patch is created/tested before then, it can be moved back for consideration.