Item9966: Rename/Move of a parent topic with a non-WikiWord name breaks parent-child linkage
Priority: Normal
Current State: Closed
Released In: 1.1.3
Target Release: patch
- Create topic "Test1"
- Create topic "Test2" and set parent to "Test1".
- Rename "Test1" to "Test3".
- "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:
- Add a meta data specific sub-regex to the search regex used to find references initially
- Use regexes specific to the individual data types of the meta data fields when updating references
- 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