Problem with combination PluginGroup and PluginRedirect
Hi
I am struggling with the combo of the redirect and group plugin.
Desired functionality:
Anonymous people visiting the homepage should see a custom page with a sign in or sign up button (thanks to Bernard Sfez!). When logged in they should be redirected to their user information page.
The original homepage looked like this:
{GROUP(groups="Registered" notgroups="Anonymous")} {redirect url="tiki-user_information.php"} {ELSE} {redirect page="Sign In or Sign up"} {GROUP}
This does not work, I always get redirected to the Signing in or up page after login.
I also noted something strange.
I switched the second redirect to test often between page and url (everytime with a plugin approval). In the preview with url, I get the error REDIRECT PLUGIN: No page specified!
When in preview with page, the error is REDIRECT PLUGIN: No url specified!
The error seems to refer to the previously used parameter in the redirect plugin. Is this a bug?
The code below however works perfectly but is not elegant. I just pasted the wiki syntax code from the Signing in or up page where the second redirect was without any modifications.
{GROUP(groups="Registered" notgroups="Anonymous")} {redirect url="tiki-user_information.php"} {ELSE} {DIV(class="row my-5")} {DIV(class="col-md-6 bg-primary text-white p-3")} !! Sign Up This is a great moment for you to register %%% ::{button href="<link>/tiki-register.php" _text="Register" _type="warning"}:: {DIV} {DIV( class="col-md-6 bg-info text-white p-3")} !! Sign in We are happy to see you back %%% ::{button href="<link>/tiki-login.php" _text="Login" _type="secondary"}:: {DIV} {DIV} {GROUP}
Can I use more than 1 redirect statement in a page?
What did I do wrong?
Is there another way to achieve this?