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

XWIKI-12987: Relative links are made absolute or even broken after moving a page #3634

Merged
merged 12 commits into from
Nov 13, 2024

Commits on Nov 12, 2024

  1. XWIKI-12987: Relative links are made absolute or even broken after mo…

    …ving a page
    
    WIP
    The idea of this work is to:
      1. Provide a way to access all documents that are moved as part of a
         move job
      2. Use that information when performing a call to ReferenceRenamer to
         define if a relative untyped link should be handled or not
    
    On top of it, the idea is also to check if the doc exists in case of
    refactoring of a link to avoid refactoring unexisting relative links.
    One problem is remaining about relative link pointing to sibling pages
    (e.g. the link to Alice in Bob page in the ticket): we rely apparently
    to an old mechanism for backward compatibility reason for this to work
    in the UI, we might need same thing in the check, or to decide to
    ignore that UC.
    
    I started to add an integration tests but for some reason it's not
    passing, though it seemed to be working locally for the scenario
    described in the ticket (except for the link in Bob page).
    surli committed Nov 12, 2024
    Configuration menu
    Copy the full SHA
    e21fb37 View commit details
    Browse the repository at this point in the history
  2. XWIKI-12987: Relative links are made absolute or even broken after mo…

    …ving a page
    
      * Fix integration test setup
      * Fix some signatures
      * Work on the conditions for performing link update: WIP
    surli committed Nov 12, 2024
    Configuration menu
    Copy the full SHA
    460658f View commit details
    Browse the repository at this point in the history
  3. XWIKI-12987: Relative links are made absolute or even broken after mo…

    …ving a page
    
      * Fix conditions to make all RenamePageIT passing
      * WIP: need to double check that some conditions are not redundant and
        double check side effects
    surli committed Nov 12, 2024
    Configuration menu
    Copy the full SHA
    f9d6fc3 View commit details
    Browse the repository at this point in the history
  4. XWIKI-12987: Relative links are made absolute or even broken after mo…

    …ving a page
    
      * Simplify a bit the conditions in ResourceReferenceRenamer and ensure
        all unit tests are passing in refactoring module
    surli committed Nov 12, 2024
    Configuration menu
    Copy the full SHA
    663edd6 View commit details
    Browse the repository at this point in the history
  5. XWIKI-12987: Relative links are made absolute or even broken after mo…

    …ving a page
    
      * Fix checkstyle
      * WIP: try to find proper oracle for renaming absolute references,
        without success so far.
    surli committed Nov 12, 2024
    Configuration menu
    Copy the full SHA
    de3bd0a View commit details
    Browse the repository at this point in the history
  6. XWIKI-12987: Relative links are made absolute or even broken after mo…

    …ving a page
    
      * Find proper conditions to perform or not link renames
      * Fix unit tests to add missing conditions
      * WIP: need to fix coverage and check on subwikis / with more
        conditions (e.g. with holes in hierarchy)
    surli committed Nov 12, 2024
    Configuration menu
    Copy the full SHA
    ea71edf View commit details
    Browse the repository at this point in the history
  7. XWIKI-12987: Relative links are made absolute or even broken after mo…

    …ving a page
    
      * Fix a regression and provide a test to cover it
    surli committed Nov 12, 2024
    Configuration menu
    Copy the full SHA
    a8689a9 View commit details
    Browse the repository at this point in the history
  8. XWIKI-12987: Relative links are made absolute or even broken after mo…

    …ving a page
    
      * Provide subwiki integration tests
      * Minor improvment in RenamePageIT
    surli committed Nov 12, 2024
    Configuration menu
    Copy the full SHA
    1df0a36 View commit details
    Browse the repository at this point in the history
  9. XWIKI-12987: Relative links are made absolute or even broken after mo…

    …ving a page
    
      * Improve SubWikiIT to add more checks
    surli committed Nov 12, 2024
    Configuration menu
    Copy the full SHA
    ce1f455 View commit details
    Browse the repository at this point in the history
  10. XWIKI-12987: Relative links are made absolute or even broken after mo…

    …ving a page
    
      * Few improvments following review
    surli committed Nov 12, 2024
    Configuration menu
    Copy the full SHA
    a7dedf4 View commit details
    Browse the repository at this point in the history
  11. XWIKI-12987: Relative links are made absolute or even broken after mo…

    …ving a page
    
      * Change APIs to use a Map<EntityReference, EntityReference>
        corresponding to the source and target of refactorings in renamers
      * Change some logic of AbstractCopyOrMoveJob to compute the actual
        couple source/destination before performing any operation and store
    the info in EntitySelection
      * Add a log in RenameJob if it's not executed because of the number of
        entities (not needed for this issue, but felt better to understand
    what's happening)
    surli committed Nov 12, 2024
    Configuration menu
    Copy the full SHA
    e73d4c5 View commit details
    Browse the repository at this point in the history
  12. XWIKI-12987: Relative links are made absolute or even broken after mo…

    …ving a page
    
      * Fix remaining coverage problems
    surli committed Nov 12, 2024
    Configuration menu
    Copy the full SHA
    c9be265 View commit details
    Browse the repository at this point in the history