You are here: Foswiki>Tasks Web>Item9866 (16 Aug 2015, GeorgeClark)Edit Attach

Item9866: Renaming/moving of Topics and System

pencil
Priority: Enhancement
Current State: Confirmed
Released In: n/a
Target Release: n/a
Applies To: Engine
Component: Backlinks, FoswikiUIRename
Branches:
Reported By: BobCorless
Waiting For:
Last Change By: GeorgeClark
I created a CommonLeftBar in System which I maintain in one place. Each user's LeftBar %INCLUDES{}% the "%SYSTEMWEB%.CommonLeftBar". I realised that for naming conventions I wanted to change the "!System.CommonLeftBar" name to "!System.WebCommonLeftBar" but none of my users' LeftBar topics appeared in the "Update Links" when I tried to change the topic name.

Both %SYSTEMWEB% and %USERSWEB% should included in the search/replace of a TOpic rename, not just "System" and "Main".

-- BobCorless - 22 Oct 2010

We discussed this quite a bit on IRC. I don't regard it as Urgent, because it is only of real value when renaming topics in System and Main webs, which is not something that should be done. The one exception is a name change e.g. when ClementinaClive got married and changed her name to CelementinaClivePonsonbyFane - you really don't want to have to deal with a rename like that by hand.

Confirmed.

-- CrawfordCurrie - 23 Oct 2010

If we are to make a generic fix for this we would have to interpret all macros in all topics while searching for back references.

The performance of this would be intolerable on a large installation.

Then we could decide to implement a hack where doing backlink search for a topic which in Main or System web (as set in configure) would be duplicated by additional searches for SYSTEMWEB, MAINWEB, and USERSWEB.

But is it worth it? We can NEVER get a 100% safe system for finding links to topics unless we render all topics as we search for links. Topic names can be made up from several macros.

I am very close to calling for a no action on this with respect to SYSTEM.

If we do a hack I would think the need is higher for a USERSWEB hack where people change names and it is a pain to do a global search and replace for all the places where someone has written USERSWEB instead of Main in front of wiki names.

People change names when they get married so it is quite a common problem.

An alternative can be to have a switch in the renames search that enables a more aggressive search that ignores web prefixes. Ie also suggests topics that point to the same topic name in a different web and then warn on the result that topic name is prefixed with different web name. Such a thing I would consider an enhancement and should be feature proposed, tried for a while and for sure not go into a patch release.

I am changing this to Enhancement for now. Hope this is OK. I would like to be in "thinkbox" on this one for a while.

-- KennethLavrsen - 23 Oct 2010

Now that I've taken on board the wider implications of such a change, perhaps it would make sense to add a note to the documentation that if a new Topic is created and includes a reference to a topic in Main or System that %USERSWEB% and %SYSTEMWEB% be avoided and the actual names "Main" (or whatever) and "system" (or whatever) be used instead. Any change in a Main or System Topic would then be picked up by the name change or move.

I can see why %USERSWEB% and %SYSTEMWEB% need to be used in "Foswiki" Topics because any new Extensions or code does not know in advance what the names of the Main and System webs are. Perhaps the installation/upgrade of Extensions/Plugins have a routine to replace %USERSWEB% and %SYSTEMWEB% with the actual names on the system in which they are being installed. Any subsequent Topic OR Web rename will recognise any references to Topics in the named webs. But that seems an overkill.

Perhaps just accommodating a scenario for a users name change will deal with 90% of such Topic name changes where they may have been referenced by %USERSWEB%.

-- BobCorless - 23 Oct 2010

add a note to the documentation will be useless.

Since the signature can now be configured, more users may use USERSWEB instead of Main.

It would be worth to check if there is really such a performance hit for those 2 macros.

-- ArthurClemens - 23 Oct 2010

The performance hit is if we want to expand all macros in all topics when we search for backlinks.

But doing an extra search for USERSWEB when you rename a topic in the web defined as users web in configure will only mean doing an extra search in those cases.

But if we want to address the general case where the web name could be defined by any user defined macro, we would need to expand all topics on the wiki incl all searches. it could take 15 minutes on a large installation.

-- KennethLavrsen - 23 Oct 2010
 

ItemTemplate edit

Summary Renaming/moving of Topics and System
ReportedBy BobCorless
Codebase 1.1.0
SVN Range
AppliesTo Engine
Component Backlinks, FoswikiUIRename
Priority Enhancement
CurrentState Confirmed
WaitingFor
Checkins
TargetRelease n/a
ReleasedIn n/a
CheckinsOnBranches
trunkCheckins
masterCheckins
ItemBranchCheckins
Release01x01Checkins
Topic revision: r7 - 16 Aug 2015, GeorgeClark
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