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: hyperlinks added to Image blocks without http(s) prefix append to page/page slug #51665

Closed
villanovachile opened this issue Apr 3, 2021 · 4 comments
Labels
Blocks Editor blocks, aka Gutenberg blocks, plugins, and extensions [Pri] Normal Schedule for the next available opportuinity. Triaged To be used when issues have been triaged. [Type] Feature Request Feature requests

Comments

@villanovachile
Copy link
Collaborator

villanovachile commented Apr 3, 2021

Steps to reproduce

  1. Create new post or page
  2. Add an image block, and insert an image
  3. Add link to image block, using a URL without http:// or https://. An example is shown here:

    Image Link: https://d.pr/i/s2mQwi

What I expected

I expected the image to link to automattic.com and intuitively account for the lack of the https:// prefix

What happened instead

The URL entered appends to the end of the post/page slug:

Image Link: https://d.pr/i/tgNXAE

Clicking on the image results in a 404

Browser / OS version

Browser: Chrome & Safari
OS: macOS 10.15.6

Context / Source

There was a site with multiple 404 errors from viewers (18808537-hc). We determined this was because they added their site URL as hyperlinks to image blocks, they were adding it as www.siteurl.com, which appended the URL to the end of the page/post slug.

There were 480 instances of these hyperlinks, which was resolved using search & replace

It should be noted that this issue occurs on both Simple, Atomic, and self hosted. This issue does NOT occur in the classic editor; it automatically translates www.siteurl.com to https://siteurl.com

@davipontesblog davipontesblog added Blocks Editor blocks, aka Gutenberg blocks, plugins, and extensions [Type] Feature Request Feature requests labels Apr 14, 2021
@davipontesblog davipontesblog added the Triaged To be used when issues have been triaged. label Apr 14, 2021
@davipontesblog davipontesblog changed the title Hyperlinks added to Image blocks without http(s) prefix append to page/page slug Image Block: hyperlinks added to Image blocks without http(s) prefix append to page/page slug Apr 14, 2021
@davipontesblog
Copy link
Contributor

@kwight is this something that should be transferred to the Gutenberg project repo in core, or would this be something we could "fix" in Dotcom?

@kwight
Copy link
Contributor

kwight commented Apr 14, 2021

Correct, if it can be replicated in Gutenberg, then it should be there. It sounds like a duplicate of WordPress/gutenberg#6841 (comment).

@davipontesblog
Copy link
Contributor

Correct, if it can be replicated in Gutenberg, then it should be there. It sounds like a duplicate of WordPress/gutenberg#6841 (comment).

Sounds good. Moving this back to the HE triaging board to see if this can be repro'd on a vanilla WordPress install + Gutenberg - if so, this can be moved to the Gutenberg repo: https://github.com/WordPress/gutenberg/issues

@kwight kwight added the [Pri] Normal Schedule for the next available opportuinity. label Apr 14, 2021
@mrfoxtalbot
Copy link

I can reproduce this on a local WordPress.org, with and without the Gutenberg plugin (Version 10.3.1). I have moved it here WordPress/gutenberg#31168

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Blocks Editor blocks, aka Gutenberg blocks, plugins, and extensions [Pri] Normal Schedule for the next available opportuinity. Triaged To be used when issues have been triaged. [Type] Feature Request Feature requests
Projects
None yet
Development

No branches or pull requests

4 participants