Item1741: %TOPICURL% does not work correctly in %INCLUDE%
Priority: Normal
Current State: Closed
Released In: 1.0.7
Target Release: patch
Applies To: Engine
Component:
Branches:
When used in an include, %TOPICURL% creates a URL using the base topic but the included web (if I got that the right way round).
See the example below which is including part of a topic from the Sandbox web. It has the topic part of the URL correct, but not the Web.
No permission to view TOPICURLIncludeTest
--
AndrewJones - 16 Jun 2009
Looks OK to me. What were you expecting to see?
--
CrawfordCurrie - 20 Sep 2009
Notice how it has the web
Sandbox, which is where we are including from, and the topic
Item1741, which is where we have included.
If you click on the link it has created, you will get a "Topic does not exist".
I would have expected it to be
http://foswiki.org/Tasks/Item1741
--
AndrewJones - 20 Sep 2009
OK, I understand, thanks.
%INCLUDE{"Sandbox.TOPICURLIncludeTest" section="test" }%
where that topic contains
%STARTSECTION{"test"}% %<nop>TOPICURL% is %TOPICURL% %ENDSECTION{"test"}%
shows
http://foswiki.org/Sandbox/Item1741
DefaultPreferences defines
* Set TOPICURL = %SCRIPTURL{"view"}%/%WEB%/%BASETOPIC%
By the definition in
VarTOPICURL this should of course be:
* Set TOPICURL = %SCRIPTURL{"view"}%/%BASEWEB%/%BASETOPIC%
(as you can see the local definition above has fixed it).
Confirmed. This def is only used in one place that I can find, so a fix shouldn't cause too many issues.
--
CrawfordCurrie - 20 Sep 2009
Great. Thanks.
--
AndrewJones - 20 Sep 2009