From version < 2.1 >
edited by Guillaume Delhumeau
on 2016/02/15
To version < 3.1 >
edited by Guillaume Delhumeau
on 2016/02/15
< >
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -1,3 +1,7 @@
1 +{{toc /}}
2 +
3 += Principle =
4 +
1 1  After having upgrade the XWiki instance to a recent version (7.4+), you should convert your existing pages to nested ones. This will permit:
2 2  * (1) to keep the existing hierarchy between pages, made with the parent/child relationship, which will be lost otherwise.
3 3  * (2) give you the opportunity to create pages under any old page, as you could under new pages.
... ... @@ -21,3 +21,7 @@
21 21   * $r updated
22 22  #end
23 23  {{/code}}
28 +
29 += Install Nested Pages Migrator Application =
30 +
31 +Go to the Extension Manager, and install [[Nested Pages Migrator Application>>extensions:Extension.Nested Pages Migrator Application]]. Then go to the page ##NestedPagesMigration.WebHome##.

Principle

After having upgrade the XWiki instance to a recent version (7.4+), you should convert your existing pages to nested ones. This will permit:

  • (1) to keep the existing hierarchy between pages, made with the parent/child relationship, which will be lost otherwise.
  • (2) give you the opportunity to create pages under any old page, as you could under new pages.

To perform this conversion, we have developed an application called Nested Pages Migrator Application. Its principle is to move all existing pages under their parent, so that the old parent/child relationship become physically represented by the Nested Pages hierarchy.

Fix the hierarchy

However, the current hierarchy may be messy. For example, so pages inside the space Proposal could have Main.WebHome as parent instead of Proposal.WebHome which would be more logical. It happens when the user is invited to create pages in the space Proposal directly from the main page (ex: http://design.xwiki.org/).

It's important to identify such a case before applying the migration tool, because the tool won't be able to detect this kind of unwanted hierarchies.

In the previous example, the solution was to put manually the parent of all pages of the Proposal space that had Main.WebHome as parent, to Proposal.WebHome. The following script have been used to migrate (ex: http://design.xwiki.org/):

#set ($xwql = "where doc.space in ('Proposal', 'Design', 'Improvements') and doc.parent = 'Main.WebHome'")
#foreach($r in $services.query.xwql($xwql).execute())
 #set ($d = $xwiki.getDocument($r))
 #set ($discard = $d.setParent('Proposal.WebHome'))
 #set ($discard = $d.save())
  * $r updated
#end 

Install Nested Pages Migrator Application

Go to the Extension Manager, and install Nested Pages Migrator Application. Then go to the page NestedPagesMigration.WebHome.

Get Connected