Question
TagMePlugin hyperlinks are broken
I have following in
WebTopBar:
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="60">
<tr>
<td></td>
<td></td>
<td></td>
<td rowspan="2" align="right"><div class="twikiSearchBox"><label for="go">Jump: </label><input type="text" id="go" name="topic" size="16" /></form></div></td>
</tr>
<tr>
<td><a href="%WIKILOGOURL%"><img src="%WIKILOGOIMG%" border="0" alt="%WIKILOGOALT%"/></a></td>
<td> </td>
<td> <font size="-2"> [[TWiki.TagMeViewAllTags][Tags]]: %TAGME{ tpaction="%URLPARAM{tpaction}%" tag="%URLPARAM{tag}%" }%</font><form></td>
</tr>
</table>
On a TWiki web everything works well:
but on other webs links to tags and create new tag are broken:
Could someone tell what am I doing wrong?
Thank you in advance.
Environment
--
DaliborSvoboda - 03 Mar 2006
Answer
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
Do you have the Plugin installed in the TWiki web or another web?
Where is the questionmark link pointing to?
--
PeterThoeny - 04 Mar 2006
I am not sure if I understood your first question. But the plugin is installed exactly as is written in "Plugin Installation Instructions". I checked its path and it is:
/srv/www/twiki/lib/TWiki/Plugins/TagMePlugin.pm . So probably in TWiki web.
I made Set DEBUG = 1 but it did not create any otuput... so I have no more information to send you.
In the Main web:
http://wtsource.domain-1.de/twiki/bin/edit/TWiki/http://wtsource/domain-1/de/twiki/bin/viewauth/TWiki/TagMePluginFrom%3dMain/TWikiPreferences?topicparent=Main.TWikiPreferences
In another (the WKUWS) web:
http://wtsource.domain-1.de/twiki/bin/edit/TWiki/http://wtsource/domain-1/de/twiki/bin/viewauth/TWiki/TagMePluginFrom%3dWKUWS/WebHome?topicparent=WKUWS.WebHome
If you installed the Plugin in its default location, your Plugin topics will be in the TWiki web, which it should.
Where do you see the URLs you listed?
On the questionmark links next to the tags: Look at the HTML source and post the URL of the questionmark link.
--
PeterThoeny - 04 Mar 2006
Yes links ar on question mark next to "create new tag". (I used right-click and copy link location in Firefox to get its value.)
Here is fragment of html source:
<td> <font size="-2"> <a href="/twiki/bin/view/TWiki/TagMeViewAllTags" class="twikiLink">Tags</a>: <form name="tags" action="http://wtsource.domain-1.de/twiki/bin/viewauth/Main/WebHome" method="post"> <span class="twikiNewLink">setting<a rel="nofollow" href="/twiki/bin/edit/TWiki/http://wtsource/domain-1/de/twiki/bin/view/TWiki/TagMeViewSpecificTagTag%3dsettingBy%3d?topicparent=Main.WebHome" title="Create this topic"><sup>?</sup></a></span> <font color="#808080"> 1</font> <a href="http://wtsource.domain-1.de/twiki/bin/viewauth/Main/WebHome?tpaction=add;tag=setting"><img src="/twiki/pub/TWiki/TagMePlugin/tag_add.gif" alt="Add my vote for this tag" title="Add my vote for this tag" width="12" height="10" border="0" /></a>, <select name="tag"> <option></option> <option>fanuc</option> <option>installation</option> <option>knowledgebase</option> <option>piwm</option> <option>preferences</option> <option>project</option> <option>revisit</option> <option>tagging</option> <option>troubleshooting</option> </select><input type="hidden" name="tpaction" value="add" /><input type="submit" value="Add" />, <span class="twikiNewLink">create new tag<a rel="nofollow" href="/twiki/bin/edit/TWiki/http://wtsource/domain-1/de/twiki/bin/viewauth/TWiki/TagMePluginFrom%3dMain/WebHome?topicparent=Main.WebHome" title="Create this topic"><sup>?</sup></a></span></form></font><form></td>
Thank you for your help.
--
DaliborSvoboda - 04 Mar 2006
I have no idea why you get this link. Here is the code for the tag link format:
$tagLinkFormat = '[[%SCRIPTURL%/view%SCRIPTSUFFIX%/' . $installWeb
. '/TagMeViewSpecificTag?tag=$tag;by=$by][$tag]]';
So it
should produce a
%SCRIPTURL%/view%SCRIPTSUFFIX%/TWiki/TWiki/TagMeViewSpecificTag?tag=NAME_OF_TAG;by= link (with variables resolved.)
I think it is time for some
TWikiDebugging. Also try to disable all other Plugins to see if another Plugin is the culprit.
--
PeterThoeny - 05 Mar 2006
I have some new findings but still no solution.
I entered
TWiki::Func::writeDebug into more functions of
TagMePlugin.pm to get values of more variables, but they always had the right values. There was nothing wrong with
$installWeb, $pluginName, $web, $topic....
I also enetred
[[TWiki.TagMeViewAllTags][Tags]]: %TAGME{ tpaction="%URLPARAM{tpaction}%" tag="%URLPARAM{tag}%" }%
directly into a
Main.WebHome topic and it was OK. I also enetered string above to the
Main.WebLeftBar and links were also OK.
This means that topic had broken links in " top bar " but good ones in the " topic body " and Main.WebLeftBar in the same time.
Is there something special in WebTopBar and WEBCOPYRIGHT (where it also does not work) processing?
I created the
Main.WebTopBar topic, but it did not replace the
TWiki.WebTopBar - so this solution also does not work for me.
--
DaliborSvoboda - 07 Mar 2006
I also have this same problem... (I try to place the
into
WebTopBar) and it appends a tag; it appears as though something in
WebTopBar doesn't think the page exists and overwrites the default from this line in the module:
$text .= " [[https://twiki.org/cgi-bin/viewauth/$installWeb/$pluginName?"
. "from=$web.$topic#AddNewTag][create new tag]]";
--
TWikiGuest - 09 Mar 2006
I could finally reproduce it on a TWiki 4 installation. I am still investigating the actual cause (looks like a bug in TWiki 4), but here is the workaround:
1. In
sub initialize, change the
$tagLinkFormat from TWiki markup to HTML:
$tagLinkFormat = '<a href="%SCRIPTURL%/view%SCRIPTSUFFIX%/' . $installWeb
. '/TagMeViewSpecificTag?tag=$tag;by=$by">$tag</a>';
2. In
sub showDefault, change the "create new tag" link from TWiki markup to HTML:
$text .= " <a href=\"%SCRIPTURL%/viewauth%SCRIPTSUFFIX%/$installWeb/$pluginName?"
. "from=$web.$topic#AddNewTag\">create new tag</a>";
--
PeterThoeny - 10 Mar 2006
Filed
Bugs:Item1838
--
PeterThoeny - 11 Mar 2006
New Plugin version available from
TagMePlugin that has a work-around fix for Dakar
Bugs:Item1838
.
--
PeterThoeny - 12 Mar 2006
Thank you! The version from 12 Mar 2006 - 05:27 works well for me.
--
DaliborSvoboda - 14 Mar 2006