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

Summary

Details

Page properties
Content
... ... @@ -6,18 +6,3 @@
6 6  
7 7  = Fix the hierarchy =
8 8  
9 -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/).
10 -
11 -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.
12 -
13 -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/):
14 -
15 -{{code language="velocity"}}
16 -#set ($xwql = "where doc.space in ('Proposal', 'Design', 'Improvements') and doc.parent = 'Main.WebHome'")
17 -#foreach($r in $services.query.xwql($xwql).execute())
18 - #set ($d = $xwiki.getDocument($r))
19 - #set ($discard = $d.setParent('Proposal.WebHome'))
20 - #set ($discard = $d.save())
21 - * $r updated
22 -#end
23 -{{/code}}

Get Connected