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.