Tags:
create new tag
view all tags

Bug:

The rename action will rename not only topic, also non-topics are renamed

Test case

   * Make a change to existing topic and enter 'NewTopic <nop>NewTopic'
   * Save it and create and save the Topic 'NewTopic'
   * Go into 'More' menu of NewTopic and rename it, ex to NewTopicTwo
   * This will also change the '<nop>NewTopic' to '<nop>NewTopicTwo'

Environment

TWiki version: TWikiBetaRelease
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: Redhat 9
Web server: Apache 2.0.48
Perl version: 5.8.0
Client OS: Win XP
Web Browser: IE

-- MichaelPolivanov - 13 Feb 2004

Follow up

due to my almost militant dislike (and so likely unreasonable) of nop, I'm not entirely sure that this behavior is wrong - could someone please provide me with a second opinion?

-- SvenDowideit - 19 Jul 2004

This does not apply just to the nop tag. Examples:

  • *BoldedWikiWord*
  • <b>BoldedWikiWord</b>
  • "WikiWordInQuotes"
  • @AnyWikiWord not preceeded by whitespace or parenthesis (as indicated in the regex), or by double square brackets

So this is a bigger question. What should be fixed on a rename? Obviously just WikiWords if preceeded by allowed chars.

But there are border cases. You might point to an attachment with %PUBURL%/Web/TopicToBeRenamed/file.txt, which needs to be fixed on a rename.

I would defer this fix to DakarRelease since it needs some spec reviews.

-- PeterThoeny - 19 Jul 2004

ok, cool we'll defer

but my point it that I think all the examples listed should be renamed on topic move, and so I'm suggesting that this is not a bug at all smile

-- SvenDowideit - 19 Jul 2004

sven, i agree with you that the examples listed above should be renamed on a topic move; here's a (real world) example that should not be (completely?) renamed: https://www.twiki.org/p/pub/Web/TopicToBeRenamed/TopicToBeRenamed.txt when this happens, the attachment link is broken. or, perhaps the attachment should be renamed, too? i don't know. either way, bugs do lurk here.

-- WillNorris - 25 Sep 2004

here's an example of how this bug has manifested itself on twiki.org: on Plugins.GetAWebAddOn, there's a file called GetAWeb.txt (well, it used to be called that). due to a rename, its filename is now reported as Plugins.GetAWebAddOn.txt, and is inaccessible from the web pages (i had to wget http://twiki.org/p/pub/Plugins/GetAWeb/GetAWeb.txt to retrieve the file)

-- WillNorris - 11 Oct 2004

Are you sure that this was not wget http://twiki.org/p/pub/Plugins/GetAWebAddOn/GetAWeb.txt? Otherwise, there seems to be a bug in that the directory for the attachments did not get renamed to match the topic rename.

-- ThomasWeigert - 12 Oct 2004

thomas, you're right. what happened was i made all those comments, and then a few hours later, i was uploading a proper AddOn and renamed the topic from Plugins.GetAWeb to [[Plugins.GetAWebAddOn]. so, just another example of rename causing problems. i note that the original rename problem was due to moving GetAWeb from Codev to Plugins.

-- WillNorris - 12 Oct 2004

See also RenameChangesRefsToTopicInOtherWeb which I submitted just before I found this topic. References to topics in other webs are affected by this problem when they appear in the same topic as a reference that is to be changed.

-- OwenRees - 13 Dec 2004

This is symptomatic of a more general malaise; these sorts of changes are done heuristically. See CentraliseTopicProcessingHeuristic.

-- CrawfordCurrie - 29 Jan 2005

This might not be such a problem if there was more fine grained control for topic rename. Perhaps there should be a way of selecting to limit the search to just live links, and not references. It would also help if each individual hits for the topic name had their own checkbox instead of one checkbox per topic.

-- SamHasler - 29 Jan 2005

I also think, that the original listed examples are not a bug. Thought this hardly depends on the use-cases for 'nop'. We use 'nop' to turn of the linking mechanism, when the word should not be a topic. As a result there is no topic which can get renamed and changed 'nop´ed WikiWords'.

Besides that the URL and META issue is a real bug described also in TopicRenameChangesAttachmentName

-- AndreUlrich - 29 Jan 2005

This is actually a bigger problem than just "nop". If you are moving a page to a different web, and there are pages in the old web with non-WikiWord names, instances of those page names will be replaced with Web.name in the page being renamed, even if they are not a link!

For example, say you are renaming the page Sandbox.MyTestPage to SandboxTwo.MyTestPage. if you have a page "Sandbox.ABC", and the MyTestPage topic contains the string "ABC" in it, this will be changed to Sandbox.ABC. This happens even if "ABC" did not have double brackets around it, so it was not (and still is not) auto-linked. This is very ugly if you have any pages with a name that appears frequently in other pages, but is not a WikiWord and is not typically linked. (It is a problem for us because we are migrating from a different Wiki platform that used page numbers, not page names, so many pages do not have an appropriately formatted WikiWord title -- i.e., the page named "NFS".)

-- MarcUnangst - 04 Feb 2005

It's fine to defer things to Dakar if anyone picks them up and does something. No-one has touched this, so I'm dropping it from Dakar again. If anyone cares, they will do something about it.

-- CrawfordCurrie - 14 Apr 2005

here's another example of the bug: i renamed KernelBuildScript to KernelBuildScriptDev. a reference to the original topic in TWikiKernel wasn't caught, apparently because it uses italics: _Script discussion chopped to KernelBuildScript_

-- WillNorris - 14 Apr 2005

"The bug" is wishful thinking. There are many, many corner cases where a decision can go either way, as to whether a word is a wikiword or not. With ArthurClemens extending the definition of wikiwords to underscores, it gets even more complex.

The code that handles this is a mess; the search for referring topics during a rename is done by a search expression in a template, and there is no guarantee that the results it returns are the same as what actually gets replaced - the replacement process uses a different algorithm, embedded in code, that may be more or less aggressive. Neither algorithm is consistent with the way the rendering code finds words to replace.

Given a testcase that covers all the expected matches (and the things that should not match, of course), I would be prepared to look at this, but without one, it is just too messy to contemplate. I would even be prepared to extend the TestFixturePlugin to expose "referring pages" for tests.

-- CrawfordCurrie - 15 Apr 2005

Fix record

RenamingProblems

Edit | Attach | Watch | Print version | History: r22 < r21 < r20 < r19 < r18 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r22 - 2005-04-18 - WillNorris
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.