Item771: # anchors link to the included topics' web . WebHome when included from another topic
Priority: Urgent
Current State: Closed
Released In:
Target Release: patch
Applies To: Engine
Component:
Branches:
while looking into
Item750
i've found a further oddity if you
INCLUDE{System.Macros}
MMMMM. # anchors are broken when done inside Includes - eg??
INCLUDE{Sandbox.IncludedTopicWithAnchorsAndLinks}
No permission to view IncludedTopicWithAnchorsAndLinks
the Anchor above is being directed to Sandbox
WebHome #Anchor - not as one would expect, the # Anchor in
this topic, or possible brokenly to the # Anchor in
IncludedTopicWithAnchorsAndLinks
I think for now that means we'll have to cripple the [[VarY][Y]] by replacing the INCLUDINGTOPIC with BASETOPIC - so it works on System.Macro's but isn't totally broken if someone
INCLUDE{System.Macro}'s
--
SvenDowideit - 15 Jan 2009
The real situation is that the #MyAnchor links in an included topic works if the included topic is in the same web as the including topic.
But if the included topic is in another web the anchor link is a link to
WebHome
That is a clean cut bug that should be fixed.
--
KennethLavrsen - 07 Feb 2009
ah, excellent, thanks for pointing that out, we may well be able to just make a unit test for it and thus fix it
--
SvenDowideit - 08 Feb 2009
It looks a bit similar in effet to
TWikibug:Item2209
The fix was
TWikirev:10061. But it won't help us here
Pinpointed to _fixupIncludedTopic in Foswiki.pm.
Fixed by
distro:4bf9f0e74929. It would be really nice to write a unit test checking this, but unit test with full formatting are still off target for me. Sven, if you have a minute...
--
OlivierRaginel - 21 Feb 2009
I think you misunderstood how this feature is supposed to work.
When I have a topic with a relative Anchor link like [[#SomeAnchor][My anchor]] and I include this topic in a parent topic, I expect the relative link to point to the place of the anchor within the topic I view.
The fix you made makes the relative anchor link absolute and clicking it makes you end up in the included topic instead of the topic you are viewing.
Release blocker
--
KennethLavrsen - 22 Feb 2009
Right. Sorry, my bad. Your view makes much more sense.
Fixed the code (one line change in fact), and added 2 unit tests (with anchor as #anchor, and as #WikiName).
Therefore, closing it.
--
OlivierRaginel - 22 Feb 2009