no redirect within authenticator denied

dnigra 29 Aug, 2013
Hello,

I'm trying to show different forms depending on whether the user is logged in or not.

Within the Authenticator action, there is a Redirect user action in Denied, followed by a Show Stopper. Redirect is set to the home page.

If I am not logged in, it does not display the authenticated form (good), but it does not redirect me to the non-authenticated form, I'm still at the authenticated form URL (page is blank, though).

I use the redirect URL in lots of forms on submit. What in the world am I doing wrong here?

[attachment=2]authenticator.png[/attachment]

[attachment=0]redirectAction.png[/attachment]

[attachment=1]noRedirect.png[/attachment]
dnigra 29 Aug, 2013
OK, so I see this is not the way to do what I want.

Grayhead, please let me know if I have any of this wrong.
[list]
  • The ReDirect URL action doesn't happen until submit, so user stays on same form.

  • There's no "show html" action in the "Authenticated (Denied)" action so nothing displays.
  • [/list]

    moving on to other solutions.......
    GreyHead 30 Aug, 2013
    Hi dnigra,

    This looks OK to me. I would expect the ReDirect User to run when the page is loaded if the Authentication test fails. The ReDirection should be to the URL there - but the Target URL there isn't set to another form?

    Bob

    PS I would not use the 'Allowed' event but instead put those actions after the Authenticator. The effect is the same but it keeps your form and form code simpler by reducing the nesting.
    dnigra 30 Aug, 2013
    Hi Greyhead,

    Yes, the redirect URL was just set to the home page there. I was frustrated with getting blank forms and then I realized I hadn't added a Show HTML action yet. Not the first time I've done that, you think I would learn.

    But still, the Authenticate action never fails. I'm always left in the 'registered users' form, never redirected to the public form. I echo either "hello {cfu_name} (thanks for that action!) or "you are not logged in" at the top of the form, so I'm sure I haven't left myself logged in inadvertantly.

    I've gotten around it by using different menu items for the forms, one gets shown to the public only, the other to registered users only. If you have any ideas about what's going wrong here, I'd love to hear them.

    Thanks again. I love Chronoforms and you are incredibly patient and helpful.
    GreyHead 30 Aug, 2013
    Hi dnigra,

    Thank you :-)

    What settings do you have in the Authenticator?

    Bob
    dnigra 30 Aug, 2013
    I know, really, that the "Denied" settings are not in effect but sometimes voodoo seems like a solution. 🙂

    [attachment=0]AuthSettings.png[/attachment]
    GreyHead 30 Aug, 2013
    Hi dnigra,

    Looks OK to me :-(

    Please take a Form Backup using the icon in the Forms Manager and post it here (as a zipped file) or PM or email it to me and I'll take a closer look.

    Bob
    GreyHead 30 Aug, 2013
    Hi dnigra,

    The form seems to work OK. I removed the Show HTML from the Disallowed event as it isn't needed and removed Guest from the allowed Groups and removed all Groups from the Disallowed list.

    Bob

    The ReDirection doesn't seem to work quite correctly in Joomla! 3 - I replaced that with a Custom Code action containing
    <?php
    $app = JFactory::getApplication();
    $app->redirect('/index.php/some_url_here');
    ?>
    This topic is locked and no more replies can be posted.