+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11

Thread: update links on move

  1. #1
    Join Date
    Oct 2007
    Location
    Australia
    Posts
    79

    Default update links on move

    I have just reorganised our wiki to accommodate others in its structure (i.e. made it bigger and pushed our content down the new tree).
    Some moved pages automatically updated internal links, but others have not. Some of the pages updated only a few links.

    The old structure was a/b/c/page, which has changed to X/Y/a/b/c/page.

    This was done as a single bulk move of the entire a/b/c/ structure.

    I deleted all the redirects after I moved pages -- would this have afected the internal link building?

    Anyway, it's a great product which we are evangelising wherever we see a need for a wiki.

    Cheers,
    Tim.

  2. #2
    Join Date
    Feb 2007
    Posts
    1,871

    Default

    Quote Originally Posted by TimHunt View Post
    I deleted all the redirects after I moved pages -- would this have afected the internal link building?
    Yes - links on other pages to the pages which were in the a/b/c still reference a/b/c ... they don't automatically update. The redirect pages would have served the purpose of moving people around.

  3. #3
    Join Date
    Oct 2007
    Location
    Australia
    Posts
    79

    Default

    Roy - I have to disagree. It looks on my install (vm updated to 8.05.1) that *some* of the internal wiki links were updated on *some* of the pages that I moved. This also leads to the question of how the redirects ended up 'unused'.

    My most direct problem now is that someone published a link to people outside, and that link now fails miserably. Is there a way to manually insert a redirect into the system, without hacking the back end too heavily? I have re-instated the old structure for the one page required and and manually linked to the new location, but this makes the left bar menu appear to have more structure than is really there!


    Cheers,
    Tim.

  4. #4
    Join Date
    Feb 2007
    Posts
    1,871

    Default

    Quote Originally Posted by TimHunt View Post
    Roy - I have to disagree. It looks on my install (vm updated to 8.05.1) that *some* of the internal wiki links were updated on *some* of the pages that I moved.
    I'll have to look into that - on pages where this occurred, did you edit the pages? it's possible that on the new edit of the page, the API "corrects" links to their new location.

    This also leads to the question of how the redirects ended up 'unused'.
    This happens when you redirect A-->B ("a" becomes a redirect), and then you delete page "B".

    My most direct problem now is that someone published a link to people outside, and that link now fails miserably. Is there a way to manually insert a redirect into the system, without hacking the back end too heavily?
    Yes, you can manually force a page to become a redirect page by putting in the editor:
    Code:
    #REDIRECT [[Path/To/New/Page]]

  5. #5
    Join Date
    Oct 2007
    Location
    Australia
    Posts
    79

    Default

    Quote Originally Posted by royk View Post
    I'll have to look into that - on pages where this occurred, did you edit the pages? it's possible that on the new edit of the page, the API "corrects" links to their new location.
    I don't remember editing. When I edit the pages with broken links (i.e. links to pages that have moved) they show up red, and link to a/b/pagename. Either deleting a/b/ and letting the search find the page, or adding X/Y/ to the front of the path works.

    Quote Originally Posted by royk View Post
    This happens when you redirect A-->B ("a" becomes a redirect), and then you delete page "B".
    I'm confused. I have an unused redirect Help/Foo -> Help/xxx/Foo. Help/xxx/Foo is the real page. if I click on the redirect icon on /Help/Foo it tells me where the new page is. This implies that no page refers to Help/Foo, but that if I should link to Help/Foo from outside, the wiki will redirect me to the correct place. If I delete Help/xxx/Foo I would expect the redirect to vanish, not become 'unused'.

    Quote Originally Posted by royk View Post
    Yes, you can manually force a page to become a redirect page by putting in the editor:
    Code:
    #REDIRECT [[Path/To/New/Page]]
    Good one. But now how do I get rid of Path/to/old/page from the tree? I could move that redirect page to a deeply buried place and allow the system to redirect again, but...

    Thanks for the prompt response.

    Cheers,
    Tim.

  6. #6
    Join Date
    Jul 2006
    Location
    San Diego, CA
    Posts
    5,450

    Default

    Links to redirected pages are updated only when the page is edited again. Otherwise, the system would have to crawl all pages in the system and update them when a move occurs. That would be a very expensive operation.
    Steve G. Bjorg - Chief Architect
    Did you check the MindTouch FAQ?
    Found a bug? Report it.
    Follow me on Twitter
    Find us on IRC: irc.freenode.net #mindtouch

  7. #7
    Join Date
    Feb 2010
    Posts
    59

    Default update all affected page links after page move

    Quote Originally Posted by SteveB View Post
    Links to redirected pages are updated only when the page is edited again. Otherwise, the system would have to crawl all pages in the system and update them when a move occurs. That would be a very expensive operation.
    Steve,

    Just a question - how expensive is this - is there any possibility of creating some kind of offline job that runs overnight to do this?

    We are experiencing a similar problem after changing part of the path to many of our pages so that that part of the path matches the page title. We're now facing the prospect of having to go through page after page manually editing the page so that we can update the page links - the wiki hasn't gone live yet, but it would be good if it does without hundreds of redirects all over the place!

    Thanks.

    Alex.

  8. #8
    Join Date
    Jul 2006
    Location
    San Diego, CA
    Posts
    5,450

    Default

    Creating offline job would be relatively straightforward. Just request each page in edit mode and save it back. If the links needed to be updated, they will be updated when the page is loaded in edit mode and change will be saved. Otherwise, the save operation will skip if it detects that there are no content changes. The only detail off the top of my head you need to be careful about is keeping the edit attibuted to the most recent author of the page, but that might not be something that matters in your situation.
    Steve G. Bjorg - Chief Architect
    Did you check the MindTouch FAQ?
    Found a bug? Report it.
    Follow me on Twitter
    Find us on IRC: irc.freenode.net #mindtouch

  9. #9
    Join Date
    Feb 2010
    Posts
    59

    Default

    Thanks - I'll give it a try if we find this is a problem for us.

    If and when I get something working I'll post it here.

  10. #10
    Join Date
    Oct 2010
    Posts
    17

    Default

    Alex,

    I've run into the same problem—did you happen to come up with anything?

    Jaron

+ 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