gutenberg icon indicating copy to clipboard operation
gutenberg copied to clipboard

Links with another page with anchor link not working in Gutenberg button block

Open base-creme opened this issue 4 years ago • 9 comments

Description

When adding anchor link to gutenberg button block, link is desactivated.

Step-by-step reproduction instructions

  1. Create button with block button
  2. Enter name of a page (https://mysite.com/products)

Link works

  1. Add anchor to link (https://mysite.com/products#latest)

Link doesn't work anymore.

Screenshots, screen recording, code snippet

No response

Environment info

Gutenberg 12.3.2 Wordpress 5.8.3

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

base-creme avatar Jan 13 '22 22:01 base-creme

@base-creme I tested and couldn't reproduce an issue. Would you be able to share some screenshots of what you're seeing in the editor for the link?

talldan avatar Jan 14 '22 04:01 talldan

Here is a short video to illustrate the issue. The link in BO works well to the page with anchor. When I update the page, the link is the right one but when I click on the CTA, nothing happens… If I remove the hashtag, no problem in front.

https://user-images.githubusercontent.com/53814375/149664410-f6a4511e-e97e-49ee-8429-453f2077be74.mov

base-creme avatar Jan 16 '22 14:01 base-creme

I'm afraid I still can't reproduce it. The video does help my reproduction steps (I now know you're talking about the link in the editor), but I still can't see what happens for you as the video's dimensions are very short and wide.

When you click the link, what's the URL in the address bar?

talldan avatar Jan 17 '22 06:01 talldan

Here it is : Capture d’écran 2022-01-17 à 08 49 15

base-creme avatar Jan 17 '22 07:01 base-creme

Thanks. It looks like the link is correct then.

It's probably an issue with your destination page, does it have the form id or name correctly specified?

talldan avatar Jan 17 '22 07:01 talldan

Thank you for you help, I really appreciate it. The destination page has the id form. You see it when I tried the link in the back-office. It leads directly to the anchor in the destination page Capture d’écran 2022-01-17 à 08 54 49 .

base-creme avatar Jan 17 '22 07:01 base-creme

Sorry I can't be of much further help. The only other suggestion is that maybe your theme or a plugin is preventing the click events on the link from working. You could try disabling plugins or trying a different theme to see whether you can isolate the issue.

talldan avatar Jan 17 '22 08:01 talldan

Help us move this issue forward. This issue is being marked stale since it has no activity after 15 days of requesting more information. Please add info requested so we can help move the issue forward. Note: The triage policy is to close stale issues that need more info and no response after 2 weeks.

github-actions[bot] avatar Feb 02 '22 01:02 github-actions[bot]

Closing following triage policy

adamwoodnz avatar May 30 '22 21:05 adamwoodnz