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

Image Block: Media URL is not updated when the image is replaced with another one #18231

Closed
audrasjb opened this issue Nov 1, 2019 · 1 comment
Labels
[Block] Image Affects the Image Block [Feature] Media Anything that impacts the experience of managing media [Type] Bug An existing feature does not function as intended

Comments

@audrasjb
Copy link
Contributor

audrasjb commented Nov 1, 2019

Describe the bug
When an image has a target link to the Media file, this URL should be updated when the image is replaced with another one. Instead, the link remains the same and it's still targeting the previous media URL.

To reproduce
Steps to reproduce the behavior:

  1. Use Image block to insert an image
  2. Add a link to "Media file"
  3. Click on the "Edit image" button and replace the image with another one
  4. The link to "Media file" remains the same as before, so the image is linking to the previous image.

Expected behavior
Media URL link should be automatically updated when the image is replaced by another one.

Desktop (please complete the following information):

  • OS: Mac OSX
  • Browser: Chrome
  • Version: last

Additional context

  • Reproduced on WordPress 5.3 RC 3.
@jorgefilipecosta jorgefilipecosta added [Block] Image Affects the Image Block [Feature] Media Anything that impacts the experience of managing media [Type] Bug An existing feature does not function as intended labels Nov 21, 2019
@jorgefilipecosta
Copy link
Member

Hi @audrasjb,
Thank you for reporting this issue.
I am not being able to reproduce this issue on Gutenberg master.
I verified the code and checked that we have a condition to avoid this bug, that seems to be working well.
During this check I verified, we did not have logic to update the "Attachment Page" link so we had exactly this issue happening when the user selects "Attachment Page". I submitted a fix at #18731.
I'm closing this issue as it refers to the "Media Link" option and I'm not able to reproduce the problem. If you are still able to reproduce this issue on Gutenberg master please leave a comment so we can look deeper into the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Image Affects the Image Block [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

2 participants