Item9966: Rename/Move of a parent topic with a non-WikiWord name breaks parent-child linkage

pencil
Priority: Normal
Current State: Closed
Released In: 1.1.3
Target Release: patch
Applies To: Engine
Component: FoswikiUIRename
Branches:
Reported By: BryanThale
Waiting For:
Last Change By: KennethLavrsen
  1. Create topic "Test1"
  2. Create topic "Test2" and set parent to "Test1".
  3. Rename "Test1" to "Test3".
  4. "Test2" still has a (now defunct) "Test1" parent link!

I have a patch for FW 1.0.9 if it will help, but it looks like Foswiki::UI::Manage and Foswiki::Render have changed in 1.1

The problem stems from the fact that the find references function greps the topic text+metadata as text and thus doesn't find the topic-only links in META:TOPICPARENT and META:FORM. At least that's the problem in 1.0.9. I expect the issue persists in 1.1 and is the cause for the same behavior at trunk.foswiki.org but I haven't traced the trunk code to see if it suffers from the same problem as 1.0.9.

The attached patch file makes three changes:

  1. Add a meta data specific sub-regex to the search regex used to find references initially
  2. Use regexes specific to the individual data types of the meta data fields when updating references
  3. Add support for updating references in the fields of the META:FILEATTACHMENT fields

-- BryanThale - 05 Nov 2010

  • For Foswiki 2.0:
    • I would really like to see us use registerMETA a bit more to explicitly type some of our fields more strongly - specifically I think there is a really good case to register that a meta value holds a topicref.
  • Post-Foswiki 2.0:
    • We need to rework the way we (don't) db/cache backlinks. Lack of usable backlink features on large wikis reflects poorly on our product when compared to other wiki systems that make backlink features cheap & easy to use.

Back to reality, we can make a small fix for this in 1.1 context to address META:FORM and TOPICPARENT.

-- PaulHarvey - 05 Nov 2010

Fixed under Item10284 in 1.1.3

-- GeorgeClark - 15 Apr 2011
 

ItemTemplate edit

Summary Rename/Move of a parent topic with a non-WikiWord name breaks parent-child linkage
ReportedBy BryanThale
Codebase 1.0.9, trunk
SVN Range
AppliesTo Engine
Component FoswikiUIRename
Priority Normal
CurrentState Closed
WaitingFor
Checkins
TargetRelease patch
ReleasedIn 1.1.3
I Attachment Action Size Date Who Comment
Manage.pm.diffdiff Manage.pm.diff manage 3 K 05 Nov 2010 - 22:21 BryanThale Patch for Foswiki 1.0.9
Topic revision: r4 - 16 Apr 2011, KennethLavrsen
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy