moving internal links with the block editor
-
Hi,
I have a number of long pages which have contents sections near the beginning. Each item in this contents section contains a link (html anchor) to a specified section in the article. The format of the link is simply (say) #section15.
It is not unusual for me to rearrange the order of one or more sections in an article after I have produced a reasonable draft. When I do this, I obviously have to rearrange my contents section accordingly.
If I use CTRL/X and CTRL/V to reposition the link in the contents section, the block editor changes the link from (say) #section15 to https://bkthisandthat.wordpress.com/wp-admin/post.php?post=78650&action=edit#section15.
When I subsequently load the page outside the editor to review the article, and I click on the link then it asks me (unsurprisingly) to log into WordPress.
The blog I need help with is: (visible only to logged in users)
-
Hi there,
So whenever you make a change to an article’s links and then try to view that article you’re being asked to log back into your account?
-
Hi,
no. Moving a standard link (that will take you to another page) is not a problem, even when using CTRL/X and CTRL/V.
The problem only occurs when moving a link that will take you to an html anchor within the same page.
As described, the link in this instance is changed from (say) #section15 to (say) https://bkthisandthat.wordpress.com/wp-admin/post.php?post=78650&action=edit#section15 by using CTRL/X and CTRL/V.
If I look at the link immediately after doing the CTRL/X and CTRL/V then the link has changed, as shown above. If I subsequently view the article and click on that link then it asks me to log in. As I say, this is not surprising given the new contents of the link.
Brian
-
Hi there,
I wasn’t’ able to replicate what you’re describing. Can you please try a different web browser and let me know if it happens again?
-
Hi,
I normally use Chrome. Tried Edge. Same thing.
Is it my method? I highlight the link .. CTRL/X .. move the cursor to where I want it moved to .. CTRL/V.
Note that there are multiple links in one of my contents blocks, each separated by a single line feed (shift and enter).
Brian
-
-
Apologies @fstat for butting in, but I think I see the issue @efpunter is having.
https://pasteboard.co/IoIulAs.gif
(hoping my gif works and makes sense) -
Well that’s an interesting bug! 0_o
Thanks for the GIF, very helpful!
I did some digging and found out that it is a know bug, reported at https://github.com/WordPress/gutenberg/issues/14928
You can follow along there, and once it’s fixed there, it won’t be long before we merge that fix over here. :)
-
You’re welcome staff-blorbo, glad to be of help!
And good to hear the bug has already been reported, hopefully it won’t be too long before it’s fixed. :) -
- The topic ‘moving internal links with the block editor’ is closed to new replies.