379
Moving a page should update links
planned
Activity Feed
Sort by
D
Dmitry Kozhevnikov
We are working on that issue just changing the way how links are processed - not by the name, but by the page ID. Hope to push the pool request soon. Just let me know if this is not convenient.
DWAK
Just to add another voice to this - we absolutely need this feature as well.
Leefe
I can see that this feature request could be implemented using the "Redirect page" feature request.
I believe that MediaWiki achieve things this way. When you move/rename a page, it drops a 'redirect page' at the old location. So, all the links to the old page hit the redirect and end up at the new page.
I think there is also a max redirects limit to reduce server load for things that keep getting moved.
Rick Mason
We've been evaluating wikis for the past month or two and wiki.js is hands down our favourite. Unfortunately we can't adopt it until this issue is fixed. We'll have a lot of organization and re-organization of pages to do early on and can't be having to always manually update links.
Jim Bridger
Creating a page that had links to it also does not update the pages that link to it (they stay red until you rerender that page)
James Miller
Yes, every wiki I've ever used does this. Keep a variable that has a list of "backlink" items that is updated on each edit / page creation, and use that to quickly update all the other backlinks. AND then in the admin section where the current rebuild everything / re-render everything buttons are, put a fix backlinks button to do a slow crawl over entire site.
Kartal Armoni
really interested
Markus Jochum
I can also only point out how important this feature for any serious wiki/knowledgebase/documentation project within wiki.js is.
It is vital that internal links never ever break, just because somebody renamed or moved a page. The link structure between pages is a fundamental part of a wiki and should support the dynamic & ever changing nature of an active wiki. Moving and reorganizing content and pages should always give the users the possibility to automatically update all internal links within the wiki.
I also love the way that for example the personal knowledge base software from obsidian.md works in this regard.
No matter how often you rearrange, reorganize your pages/notes there, it always instantly updates all internal links and the associations/links between your notes are never lost/broken.
Regarding external incoming links from external sources linking into wiki.js, something like permalinks using never changing ids could be a solution for that kind of scenario, but for wiki internal links, i think auto-updated name based links are the way to go
Marc Hodgins
Take a look at the way wordpress handles this. Rather than trying to parse and update page content with links, simply maintain a redirect table with old URLs pointing to the new page location. Each page keeps a history of its previous locations, and an HTTP redirect is done if it is accessed via an old path.
Nicolas Giard
Marc Hodgins: The problem is that users would still expect links on the page to point to the new one directly (e.g. when you mouseover or copy the link). It's a good idea but doesn't fully address the problem.
jensb
Marc Hodgins: This feature is overdue, but your suggestion doesn't work if the user wants to reuse previously used links to new pages.
A clean way of doing this would be an option "[x] Update all links to this page" when moving/renaming wiki page locations. This may require a global search & replace action in all pages, or just an update of an "page_id <-> page_url" table, depending on the Wiki.js structure.
But I'm also eagerly waiting for a feature like this.
Marc Hodgins
Nicolas Giard and jensb: Ok, I agree, rewriting internal links in the page content to the new path would be nice. But even with that feature you still need a default behavior to maintain a redirect table for old paths. This is necessary to avoid breaking inbound links from external sites, links in old emails, etc.
If the user wants to intentionally re-use a path for a new page, then consider providing the ability to manually delete from the "previous paths" redirect table on each page settings, and/or, check for conflicts when creating a new page and delete the redirect.
jensb
Marc Hodgins: As long as this means that I can create stable wiki-internal links between pages
and
shuffle pages around (rename, move, restructure) after creating and interlinking them, I'm good. I don't care so much about external links.I like the way Atlassian Confluence (commercial wiki) does this: You can link by using the page name, e.g. /wiki/WhateverTitle, but since this breaks when renaming pages, you can also link by using the page ID which never changes, e.g. /wiki/page?id=XXXX-YYYY-ZZZZ-1234. Internal links (autocreated by typing a page name in [...]) will
show
the page title by default but automatically contain
the ID based link looked up on creation. The wiki also offers a "Copy link" button on each page which copies the ID based URL for external use. Also, the page namespace is flat, so shuffling around stuff in the site TOC around won't rename any pages.Maybe some of this can be applied to Wiki.js as well.
N
Nicolas Gerard
Marc Hodgins: I think you mean Nicolas Giard :-)
Nicolas Giard
planned
It was working at some point but now it's broken...
Load More
→