+ Reply to Thread
Results 1 to 4 of 4

Thread: Moving root page

  1. #1
    Join Date
    Oct 2008
    Location
    Basque Country
    Posts
    57

    Default Moving root page

    I've seen in the wiki at Moving Pages that cannot be moved the "Root page", but we need to extend our wiki, moving the root to a leaf upper in the tree, and we don't want to lost the page revision history and comments related this root page, when we move it to the new location.
    Any idea about how to do this?

    thanks!!
    himikel

  2. #2
    Join Date
    Feb 2008
    Posts
    286

    Default

    The only way I can think to do it would be to go directly to the database, but I'm 100% sure that this is not a supported technique.

    An alternative approach is that you could write script to copy the comments to another page, then you would only lose the page history, although that could even be accessed... just back on the main page.

  3. #3
    Join Date
    Feb 2007
    Location
    San Diego, CA
    Posts
    733

    Default

    Would setting up a redirect on the home page solve your problem? If so, see this thread: http://forums.developer.mindtouch.co...light=redirect. This technique will preserve the page history and comments.

  4. #4
    Join Date
    Oct 2008
    Location
    Basque Country
    Posts
    57

    Lightbulb

    brigettek, i need to replace the old root or site-home page with a new one, then the redirect don't allow me to do this, i think.

    craigsivils, yes i have modified the "pages" table, i know that this process is "unsupported" ;-), but if you do it carefully, is a quite easy task as i explain following.

    The process of moving root (site-home) page to new location:
    1- Create a new page in the wiki called "NewRoot" (from MindTouch Deki)
    2- Then open the Deki DB (by phpmyadmin) and browse "Pages" table
    3- Find the "OldRoot" page by SQL:
    SELECT * FROM pages WHERE page_title="" and page_namespace=0
    4- Edit this "OldRoot" row and set:
    - into the page_title field: the new location (NewLocation or Tree/NewLocation)
    - into the page_display_name field: empty and set as null.
    5- Find the "NewRoot" page by SQL:
    SELECT * FROM pages WHERE page_title="NewRoot" and page_namespace=0
    6- Edit this "NewRoot" row and set:
    - into the page_title field: "" (empty)
    - into the page_display_name field: the "NewRoot" page title.
    7- Optional: Maybe you need to set page_parent of the "OldRoot" to the page_id of the "NewRoot", but this is not a indispensable step (you can move it, see next step)
    8- Now you can move all the "OldRoot" page-tree to the new location, using wiki's regular move operations.

    Bye!! himikel

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts