This question about Using an extension: Answered

Saving aliases replaces their definitions with integers

I just installed AliasPlugin. In my Main.SiteAliases I put (using raw edit, not WYSIWYG):
---+!! Site-wide Aliases

%ALIAS{name="gaga" value="haha"}%

%ALIASES%

After I save this topic, it contains (view the topic after save in raw mode):
---+!! Site-wide Aliases

??0??

%ALIASES%

What's up with this?

-- FilSalustri - 24 Jan 2011

I've upgraded to Foswiki 1.1.3 and reinstalled AliasPlugin, but I still get the same problems.

Please see http://141.117.222.181/w/System/AliasPlugin, http://141.117.222.181/w/System/Webaliases, and http://141.117.222.181/w/Main/SiteAliases.

I would REALLY like to use this plugin. Can anyone please help?

-- FilSalustri - 19 May 2011

Well, have the same problem (Foswiki 1.1.3). The work around which I found (quick, probably "dirty" solution!):

1. find ~/lib/Foswiki/Plugins/AliasPlugin.pm

2. find two functions:

beforeSaveHandler() beforeEditHandler()

3. in both change the string:

return if $web eq $Foswiki::cfg{SystemWebName};

to:
return if ($web eq $Foswiki::cfg{UsersWebName} && $topic eq 'SiteAliases') || ($web eq $Foswiki::cfg{SystemWebName}) || ($topic eq 'WebAliases');

This will allow to store / edit Aliases in Main.SiteAliases, System.SiteAliases (but you can not use aliases in any topic in whole SystemWeb) and YourWeb.WebAliases. Though, one CAN NOT define and use Aliases in same topic.


Wow. That strikes me as weird. But who am I to quibble. I'll try it out. Thanks.

I note that this may also relate to Tasks.Item9888.

-- FilSalustri - 21 Jun 2011

I tried the above mods to AliasPlugin.pm, but it still doesn't work.

If I put in Main.SiteAliases exactly the following, using raw edit:
---+!! Site-wide Aliases

<!-- Put your global aliases into this list. -->
%ALIAS{name="TESTLINK" value="%SYSTEMWEB%.WebHome"}%
%ALIAS{name="TESTALIAS" value="yes"}%
%ALIAS{name="rtfm" value="read the fine manual"}%

Test area: TESTLINK

Then save the topic, the text displayed after saving is:
Site-wide Aliases

??0?? ??1?? ??2??
Test area: System.WebHome

and the content of Main.SiteAliases is
---+!! Site-wide Aliases

<!-- Put your global aliases into this list. -->
??0??
??1??
??2??

Test area: <!-- ALIAS:TESTLINK -->%SYSTEMWEB%.WebHome<!-- //ALIAS -->

Removing the test area part changes nothing.

I'm still stuck.

-- FilSalustri - 21 Jun 2011

Try listing AliasPlugin at the first position in {PluginsOrder} as has been suggested in Tasks.Item9888.

-- MichaelDaum - 27 Apr 2014
 

QuestionForm edit

Subject Using an extension
Extension AliasPlugin
Version Foswiki 1.1.3
Status Answered
Related Topics
Topic revision: r5 - 27 Apr 2014, MichaelDaum
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