Unfortunately
TWiki:Plugins/TopMenuSkin
and
TWiki:Plugins/InterwikiPlugin
do not work together in
WebTopMenu.
Example:
file
WebTopMenu.txt
...
...
If one opens
WebTopMenu itself, the Interwiki link is resolved as expected, but if any topic in the web is opened, the link in the top menu is highlighted red and would create a new topic on click.
--
TWiki:Main/RobertLaufer
- 18 May 2010
I can't reproduce it on my installation. Interwiki links work as expected in the following menu if put into a WebTopMenu:
* [[TestMenu][Test Menu]]
* Google:foobar
* [[Google:foobar][foobar on Google]]
You are indicating codebase ~twiki4, e.g. SVN trunk. Is this the case? What TWiki version do you use?
--
TWiki:Main.PeterThoeny
- 19 May 2010
I'm using TWiki-5.0.0-rc3.
In your example the first line is working also for me, but not the second one.
--
TWiki:Main.RobertLaufer
- 19 May 2010
I can confirm the bug now. Thanks for reporting!
--
TWiki:Main.PeterThoeny
- 19 May 2010
This happens to be a core TWiki bug. I changed the summary to reflect the scope change.
The bug only exists for
[[Site:page]]
links, but for plain
Site:page
links.
To reproduce:
- Create a topic in Sandbox web with
[[TWikibuf:Item6463]]
link
- Include that topic from another topic in the Sandbox web: Links is OK
- Include that topic from another topic in the Main web: Links fails (incorrectly shown as red-link to a new topic in Sandbox web)
Fix:
--- TWiki.pm (revision 18879)
+++ TWiki.pm (working copy)
@@ -429,6 +429,9 @@
$regex{defaultWebNameRegex} = qr/_[$regex{mixedAlphaNum}_]+/o;
$regex{anchorRegex} = qr/\#[$regex{mixedAlphaNum}_]+/o;
$regex{abbrevRegex} = qr/[$regex{upperAlpha}]{3,}s?\b/o;
+ # used by _fixIncludeLink: (the last OR pattern is for Interwiki link fix Item6463)
+ $regex{excludeFixIncludeLinkRegex} =
+ qr/($regex{webNameRegex}\.|$regex{defaultWebNameRegex}\.|$regex{linkProtocolPattern}:|\/|[$regex{upperAlpha}][$regex{mixedAlphaNum}]+:)/o;
# Simplistic email regex, e.g. for WebNotify processing - no i18n
# characters allowed
@@ -2024,8 +2027,8 @@
sub _fixIncludeLink {
my( $web, $link, $label ) = @_;
- # Detect absolute and relative URLs and web-qualified wikinames
- if( $link =~ m#^($regex{webNameRegex}\.|$regex{defaultWebNameRegex}\.|$regex{linkProtocolPattern}:|/)#o ) {
+ # Detect absolute and relative URLs, web-qualified wikinames and Interwiki links
+ if( $link =~ m/^$regex{excludeFixIncludeLinkRegex}/o ) {
if( $label ) {
return "[[$link][$label]]";
} else {
--
TWiki:Main.PeterThoeny
- 05 Jun 2010