This question about Using an extension: Asked

Redirect URL params fail with redirected from

I used the REDIRECT macro in a VIEW_TEMPLATE as follows:
%TMPL:INCLUDE{"view"}%
%TMPL:DEF{"content"}%
%REDIRECT{"ActivityView?Act=%TOPIC%"}%
%TMPL:END%

However the params appear as: ActivityView?redirectedfrom=OrigWeb.OriginalTopic?&Act=OriginalTopic

Because of the ?& the Act param is not picked up. A work around for now is:
%TMPL:INCLUDE{"view"}%
%TMPL:DEF{"content"}%
%REDIRECT{"ActivityView?a=b;Act=%TOPIC%"}%
%TMPL:END

Of course that should not be necessary and this is surely a bug.

An alternative workaround would be to suppress the redirectfrom parameter, is that possible?


I also realised that redirectfrom already contains the topic name and I tried to remove my REDIRECT URL params and then pick up redirectfrom in my ViewTopic as follows:
   * Set Act = %CALC{$SUBSTRING(%URLPARAM{"redirectedfrom"}%,6,999)}%

However, even though I could display the Act correctly within the topic, the relevant searches went to pot. Replacing with URLPARAM{"Act"} fixed that, but I do not understand why picking up redirectfrom and stripping of the web name doesn't work. This is at the moment the biggest foswiki mystery for me and it's not the first time I bumped into that problem.

QuestionForm edit

Subject Using an extension
Extension RedirectPlugin
Version Foswiki 1.0.8
Status Asked
Topic revision: r1 - 15 Apr 2010, JulianLevens - This page was cached on 16 Aug 2019 - 00:29.

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