Skip to content
Snippets Groups Projects
  1. Mar 14, 2025
  2. Mar 13, 2025
  3. Mar 12, 2025
  4. Mar 11, 2025
  5. Mar 07, 2025
  6. Mar 06, 2025
  7. Mar 05, 2025
  8. Mar 04, 2025
  9. Feb 27, 2025
  10. Feb 26, 2025
    • Simon Urli's avatar
      XWIKI-22787: Pinned Pages are lost on space move for non admin user (#3886) · 124ef73a
      Simon Urli authored
        * Start work to have specific handling of WebPreferences in case of
          move/rename/copy of a full space
        * Fix unused import
        * Provide integration test
        * Fix wrong conditions
        * Add unit tests
      
      (cherry picked from commit 594fd60d)
      124ef73a
    • Simon Urli's avatar
      XWIKI-22717: Can't move an application created with AWM · 5bcd9e94
      Simon Urli authored
        * Fix problems when trying to rename an entire space
        * Ensure to cover this UC in unit tests
      
      (cherry picked from commit ba4bd1e0)
      (cherry picked from commit 61fd5777)
      5bcd9e94
    • Simon Urli's avatar
      XWIKI-22571: Backlinks update changes an absolute reference to the moved page... · a48e4e39
      Simon Urli authored
      XWIKI-22571: Backlinks update changes an absolute reference to the moved page into one relative to the current wiki
      
        * Update test
      
      (cherry picked from commit 4904b347)
      a48e4e39
    • Simon Urli's avatar
      XWIKI-22571: Backlinks update changes an absolute reference to the moved page... · 1b14fe7f
      Simon Urli authored
      XWIKI-22571: Backlinks update changes an absolute reference to the moved page into one relative to the current wiki (#3654)
      
        * Use default serializer if the wiki is present in a link, not the
          compact serializer
        * Provide unit test and integration test to cover this
        * Fix DeletePageIT tests
        * simplify condition by using the relative resource reference resolver
        * fix tests
      
      (cherry picked from commit d2d9a575)
      1b14fe7f
    • Simon Urli's avatar
      XWIKI-12987: Relative links are made absolute or even broken after moving a page · b1f583c4
      Simon Urli authored
        * ugly fix of the page reference regression and cover it with
          integration test
      
      (cherry picked from commit 60b05424)
      b1f583c4
    • Simon Urli's avatar
      XWIKI-12987: Relative links are made absolute or even broken after moving a page (#3634) · c9b78897
      Simon Urli authored
      The idea of this work is to:
      
          * Change the way AbstractCopyOrMoveJob works to perform computation of couple source/target documents before processing them
          * Provide a way to access that map source/target documents
          * Use that information when performing a call to ReferenceRenamer to define if a relative untyped link should be handled or not
      
      The PR provides mainly:
      
          - new APIs in ReferenceRenamer and MacroRefactoring to integrate the map of references that have been moved as part of same job
         - refactorings of AbstractCopyOrMoveJob:
            *  specific computation of getEntities to actually visit the hierarchy and populate the entities with the couple of source/target documents
            * new abstract methods to avoid duplications (not strictly needed for this work)
            * new method to retrieve the map of source/target documents
          - new conditions in ResourceReferenceRenamer to decide if a link should be renamed or not: most of the logic of the fix is encoded there (see also clarifications)
          - new calls in XWiki#updateLinksForRename and BackLinkUpdaterListener#updateBackLinks to give the map of source/target when calling the rename of references
          - new integration test simulating the scenario indicated in the ticket and also performing a supplementary check related to a regression found afterwards
          - same integration test also performed on a subwiki in SubWikiIT
      
      The refactoring of references is currently called at two places:
      
          by the BackLinkUpdaterListener for all backlinks after a document has been renamed (triggered by a document event)
          by XWiki#updateLinksForRename to rename the internal links of the current document (which is always a call to updateResourceReferenceRelative, see below)
      
      The problem of XWIKI-12987 is that XWiki#updateLinksForRename is called first and does perform an absolute rename of the relative links.
      Now ResourceReferenceRenamer APIs names might be misleading: updateResourceReferenceRelative and updateResourceReferenceAbsolute are not about the references being absolute or relative: it's about the renamed references being absolute or relative respectively to the current document. It took me a while to integrate this, and I'm still struggling a bit with it.
      
      So the problem was to find a proper condition to decide when to not refactor links, for this I'm performing a check for assessing if a link is absolute or not, by trying to resolve the ResourceReference without any parameter: if the result equals the reference with parameter then it was absolute.
      
      Then for the updateResourceReferenceAbsolute the idea is to only perform update of the links, if the provided link is absolute, or if it's relative but the current document hasn't been moved as part of same job: in such case we do need to update the relative link, because there won't be a call to XWiki#updateLinksForRename on that document to update the link, we only get the call from BackLinkUpdaterListener.
      
      For the updateResourceReferenceRelative the check is a bit more complex.
      We only update links that are relative here, we don't want to update absolute references (is that correct? Can't find a counter example right now).
      Then since we only perform refactoring of links relative to current document, we also check that the link about to be refactored is not related to pages that are part of the moved document in the same job: if those are also moved in the same job, then they're moved using same "direction", they're part of same hierarchy and we don't want to change the relative links wrt to them. This check is the main part of avoiding to update the relative links.
      
      And finally we perform the update of the link only if the doc actually exists: we would create absolute links for those not existing doc, which doesn't make sense, we should keep the relative link we don't really know what the user wanted to do with those. Note that we could do the same check in updateResourceReferenceAbsolute but we don't really have the need since this is only called from the BackLinkUpdaterListener and if I'm correct we'll never have registered backlinks for a not existing doc.
      
      Note that initially we discussed about using untyped link as a condition to perform or not the refactoring: I dropped the idea because we currently always create image resource references as untyped references from the WYSIWYG editor.
      
      Note that this work currently includes a known regression when renaming links on the form `page:../SubSpace/Page`, this is going to be handled in further work.
      
      (cherry picked from commit fc01c140)
      c9b78897
    • Simon Urli's avatar
      XWIKI-22681: Provide a relative ResourceReferenceEntityReferenceResolver (#3673) · 8c736ac4
      Simon Urli authored
      (cherry picked from commit 65acde03)
      8c736ac4
    • Simon Urli's avatar
      XWIKI-22702: Provide parentType information in EntityReference · 6e950fb6
      Simon Urli authored
        * Minor improvment
      
      (cherry picked from commit a5f4f86c)
      6e950fb6
    • Thomas Mortagne's avatar
      XWIKI-22702: Provide parentType information in EntityReference · b6efa941
      Thomas Mortagne authored and Simon Urli's avatar Simon Urli committed
      * remove unused import
      
      (cherry picked from commit b845a4a7)
      b6efa941
    • Simon Urli's avatar
      XWIKI-22702: Provide parentType information in EntityReference (#3698) · 583dd0f9
      Simon Urli authored
        * Provide EntityReference#getParentType
        * Use it in AbstractReferenceEntityReferenceResolver
        * Provide a new test
        * add more explanatory tests
        * Improve a bit the checks when setting the fallbackParentType
          parameter value
        * use back parentType parameter key name
      
      (cherry picked from commit c5b9c605)
      583dd0f9
    • Simon Urli's avatar
      [Misc] Move some deprecated class from model-api to legacy · d879a3e8
      Simon Urli authored
      (cherry picked from commit 4e2efc81)
      d879a3e8
    • Vincent Massol's avatar
      [Misc] Convert a JUnit4-based rendering tests to JUnit5 · bce9643e
      Vincent Massol authored and Simon Urli's avatar Simon Urli committed
      (cherry picked from commit 95e312ab)
      bce9643e
    • Simon Urli's avatar
      XWIKI-22583: Allow users with edit rights on a page and all its children to... · 9dfaf270
      Simon Urli authored
      XWIKI-22583: Allow users with edit rights on a page and all its children to use the Pinned Pages feature
      
        * Mitigate possible flickering behaviour
      
      (cherry picked from commit 4dd45461)
      9dfaf270
Loading