Loading...
 
Features / Usability

Features / Usability


Problem with combination PluginGroup and PluginRedirect

posts: 1 Belgium

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:

Copy to clipboard
{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.

Copy to clipboard
{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?

posts: 8633 Israel

Hello Pieter and thanks, (happy to see I helped)

I have to admit that I didn’t used the redirect plugin since a while.

You could. instead of more clicks and steps, create (and you started) an entry page with the group plugin.
On this page anonymous sees encouragement to register and a registration form (sign-up) and the login module "have already an account ? (sign-in) {ELSE} logged users sees the content you want them too see.


Upcoming Events

1)  18 Apr 2024 14:00 GMT-0000
Tiki Roundtable Meeting
2)  16 May 2024 14:00 GMT-0000
Tiki Roundtable Meeting
3)  20 Jun 2024 14:00 GMT-0000
Tiki Roundtable Meeting
4)  18 Jul 2024 14:00 GMT-0000
Tiki Roundtable Meeting
5)  15 Aug 2024 14:00 GMT-0000
Tiki Roundtable Meeting
6)  19 Sep 2024 14:00 GMT-0000
Tiki Roundtable Meeting
7) 
Tiki birthday
8)  17 Oct 2024 14:00 GMT-0000
Tiki Roundtable Meeting
9)  21 Nov 2024 14:00 GMT-0000
Tiki Roundtable Meeting
10)  19 Dec 2024 14:00 GMT-0000
Tiki Roundtable Meeting