Submitted by : simon at: 2003-10-26T21:32:03+00:00 (14 years ago)
Name :
Category : Severity : Status :
Optional subject :  
Optional comment :

When renaming a page with the update backlinks checked, any text with that page name will be changed. I only expected links to be changed.

I couldn't reproduce it here due to memory limitations, but a test is all set for renaming [I Like Popcorn]? to [I Like Cracker Jack]?.

trying to determine impact --DeanGoodmanson, 2003/05/13 19:04 GMT
The relevance for this is growing with the use of FreeformLinks. In a project wiki changing the page name from Installer to Installations, or more reasonabley something more specific, and a lot of existing content is changed. I don't have a great example (thankfully?).


comments:

the "update backlinks" option is gone, issue still valid --betabug, Sat, 17 May 2008 11:05:01 -0700 reply
Even though the "update backlinks" option is gone, the issue is still valid - I was able to reproduce it using the word "Installer", by having that word as a non-link in a page, then creating a page with id "Installer" and renaming the page to "Foobarrer", the plain word Installer was turned into a wikilink for "Foobarrer".

I couldn't reproduce it with a freeform link. Tried with [bug tracker], which wasn't picked up by renaming a page called "bug tracker" / BugTracker. Dunno if that is another bug.

A patch is in my repo... not yet optimal --betabug, Tue, 20 May 2008 00:27:42 -0700 reply
In my repo (see DarcsRepos), there is a patch that will fix this problem:

  * 517 - updating backlinks does not create links out of plain text any more.
  Problem existed when the canonical ID of the old page matched some plain
  text word (which happens only when the word in question is not a WikiWord).
  We're now checking this condition.
  *But* there are other problems with this method: It does only bracket
  freeform links and replaces sometimes with bracket links what could be
  WikiLinks - it will also not gracefully handle other styles of freeform
  links (double-bracket or double-parenthesis). A more thorough patch is
  in the works, this is here so there is a minimal working version to compare.

I suggest we apply this patch for the moment to -unstable - to avoid doing accidental damages when renaming stuff on zwiki.org, while I go and refactor the _replaceLinks() method (maybe using the pre-linking information, as the docstring comment suggests).

Once the patch is in -unstable, we could rename this issue to "refactor updating backlinks". I'd still keep it a priority though, not something for the wishlist.

refactored "update backlinks", patch in my repo --betabug, Tue, 20 May 2008 06:07:40 -0700 reply
The 2nd patch is in my repo too. IMHO this one does everything right: Doesn't repeat this bug of course, treats all kind of bracketing links right, along with WikiLinks, and if a link was a wikilink before, it tries to make it a WikiLink from the new page again (if it can). About the only thing it doesn't do is change links that were "fuzzy links".

patch is in darcs -unstable now, closing this --betabug, Sat, 31 May 2008 02:11:53 -0700 reply
Status: open => closed