You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
There are some serious problems with the handling of Anchor links already (c.f. Issue #16165), but here's another: sometimes - and 100% of the time for particular strings - Gutenberg replaces what the user typed and what was saved with different text with an extra "#" symbol on the front (i.e. two # symbols instead of one), which corrupts the link and forces broken links. Once this happens it is literally impossible to include a link in a page - Gutenberg keeps corrupting it.
To reproduce
Steps to reproduce the behavior:
Select a complete Heading para
In Advanced tab copy/paste a string to the HREF/anchor field
Select something else (to make sure the field above accepts the input. This seems to be a separate bug that sometimes Gutenberg "forgets" what was pasted - I assume this is because of the async code behind the scenes)
Come back and copy the string out of the HREF/anchor field (if there were any spaces, they've now been convertd to dashes)
Select some text somewhere in a paragraph on the page
Press the link button
Type a # symbol into the link box, then paste in the anchor-text
Press the return button - OR - type return/enter on keyboard (tried both, bug happens with both)
Check the link - it's correct on mouseover
Check the link by editing it - it's still correct
Update page, open in browser - link is now corrupt
I have a page of links and this happens about one time in 30 or so. I cannot see any pattern for the text that causes it, but here's a current example:
Note the extra #. Nothing gets rid of this, Gutenberg keeps putting it back in.
Note: Other text that appears almost identical has no problems, works the other 29 times in 30. e.g. here's one that Gutenber does NOT corrupt: "#FAQ:-Pre-launch-support-forum-thread?"
By trial and error, I've found that inserting a few random extra characters into the link, or removing a few, often causes this bug to go away. But it takes lots of attempts. NB: it's not a special character, simply deleting a plain letter in the middle of a word is sometimes enough to "fix" it.
Expected behavior
A clear and concise description of what you expected to happen.
Gutenberg should not be rewriting links when it saves / outputs them! It should be using the text in editor!
And also: even if it is going to rewrite data, it shouldn't insert fake # symbols into linkings, breaking them :).
Screenshots
If applicable, add screenshots to help explain your problem.
Editor version (please complete the following information):
WordPress version: 5.3.2
Does the website has Gutenberg plugin installed, or is it using the block editor that comes by default? "default"
If the Gutenberg plugin is installed, which version is it? N/A
Desktop (please complete the following information):
OS: Windows
Browser Firefox
Version 76.0
Smartphone (please complete the following information):
@adamgit Thanks for providing so much information, but the reproduction steps aren't clear enough.
It's helpful if you can provide a numbered list of very basic steps to reproduce the issue.
What seems to be missing is where in the user interface you're pasting the link, so if you could update the description that would be very helpful. My first instinct was that this was related to adding links to paragraph text, but the linked issue (#16165) is related to the HTML Anchor field, so perhaps it's that.
Also, minor addendum: I've been experiencing this problem for a month, and trying everything I could think of to narrow it down. But I just can't find any pattern in when it happens. If there's anything else I can do/try next time it occurs to get more data, let me know
Describe the bug
There are some serious problems with the handling of Anchor links already (c.f. Issue #16165), but here's another: sometimes - and 100% of the time for particular strings - Gutenberg replaces what the user typed and what was saved with different text with an extra "#" symbol on the front (i.e. two # symbols instead of one), which corrupts the link and forces broken links. Once this happens it is literally impossible to include a link in a page - Gutenberg keeps corrupting it.
To reproduce
Steps to reproduce the behavior:
I have a page of links and this happens about one time in 30 or so. I cannot see any pattern for the text that causes it, but here's a current example:
"#FAQ:-The-XR-Plugin-Management-tab-is-missing-after-installing-the-package?"
...copy/pasted directly from the Gutenberg editor, and visible as that in the editor, then is output to the raw HTML as:
"##FAQ:-The-XR-Plugin-Management-tab-is-missing-after-installing-the-package?"
Note the extra #. Nothing gets rid of this, Gutenberg keeps putting it back in.
Note: Other text that appears almost identical has no problems, works the other 29 times in 30. e.g. here's one that Gutenber does NOT corrupt: "#FAQ:-Pre-launch-support-forum-thread?"
By trial and error, I've found that inserting a few random extra characters into the link, or removing a few, often causes this bug to go away. But it takes lots of attempts. NB: it's not a special character, simply deleting a plain letter in the middle of a word is sometimes enough to "fix" it.
Expected behavior
A clear and concise description of what you expected to happen.
Gutenberg should not be rewriting links when it saves / outputs them! It should be using the text in editor!
And also: even if it is going to rewrite data, it shouldn't insert fake # symbols into linkings, breaking them :).
Screenshots
If applicable, add screenshots to help explain your problem.
Editor version (please complete the following information):
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
The text was updated successfully, but these errors were encountered: