As a user, I want links on copied pages to point to copied pages
Description
Activity
Yuriy Harbuziuk 6 January 2020 at 10:09
As this feature would require loading all the copied pages for analysis, we could also implement another feature that some competitors already have: replace text in copied pages. Both, link fixing and text fix could be implemented as separate features, in case user decides to apply fixes at a later stages, after pages were already copied (e.g. hierarchically replace text on pages of selected parent).
Yuriy Harbuziuk 6 January 2020 at 09:59
We could add a checkbox "Fix links" to handle this. After copy is finished, go through whole tree of pages, and fix links as follows: if link is pointing to source space then fix link to point to copied page. As page may be copied to the same namespace, we should probably only fix links to pages that where copied in current process. Otherwise we risk fixing generic links (see example below).
Generic page PG is the same for all projects.
Project page P1 has link to its child page C1, and to generic page PG.
After copy to the same namespace, link to C1 becomes C2 because we copied this page, but link to PG must remain the same (because we didn't make a copy of it).
NOTES:
We don't want to fix links that point to namespaces other than source namespace, because those might be pointing to some generic pages.
there was a feature in old editor to point to not-yet-existing pages. Need to investigate if this is possible to fix for new editor.
Fix links on copied pages to point to newly copied pages.
Lets say there is a parent P1 and child page C1. Parent has a link to child page. We copy P1 to P2, so C1 gets copied to C2.
Expected result Link on P2 points to C2.
Actual result Link on P2 points to C1.
Related CS issue:
https://brizoit.atlassian.net/browse/CS-944