• Hello Fabrik Community

    Fabrik is now in the hands of the development team that brought you Fabrik for Joomla 4. We have recently transitioned the Fabrik site over to a new server and are busy trying to clean it up. We have upgraded the site to Joomla 4 and are running the latest version of Fabrik 4. We have also upgraded the Xenforo forum software to the latest version. Many of the widgets you might have been used to on the forum are no longer operational, many abandoned by the developers. We hope to bring back some of the important ones as we have time.

    Exciting times to be sure.

    The Fabrik 4.0 Official release is now available. In addition, the Fabrik codebase is now available in a public repository. See the notices about these in the announcements section

    We wish to shout out a very big Thank You to all of you who have made donations. They have really helped. But we can always use more...wink..wink..

    Also a big Thank You to those of you who have been assisting others in the forum. This takes a very big burden off of us as we work on bugs, the website and the future of Fabrik.

Logout + redirect + message not possible

tritongr

New Member
In a form's onAfterProcess PHP I have this code:

1. $app = JFactory::getApplication();
2. $app->logout();
3. $app->redirect("/success", "Successful save");
4. return true;
Works partially. User redirected to /success page and logged out, but no message appear.

Following I swap lines 2 and 3,
1. $app = JFactory::getApplication();
2. $app->redirect("/success", "Successful save");
3. $app->logout();
4. return true;
Works partially. User redirected to /success page and message appear but no logout executed

Is it possible to achieve all 3? Redirect, message and logout?
 
This is Joomla, not Fabrik.
You can add messages with
$app->enqueueMessage("your text");
 
Thanks troester for the reply,

but I try the following code without success on displaying the message "All good".
Logout + redirect goes ok.
$app = JFactory::getApplication();
$app->enqueueMessage("All good");
$app->logout();
$app->enqueueMessage("All good");
$app->redirect("/success", "Successful save");
$app->enqueueMessage("All good");
return true;

The reason I need PHP for sending the message to the redirect page, is that I have to include some form field values (using placeholders etc).
 
In fact after form submission I would like to logout the user and redirect to a page displaying some of the choices has made.
Something like this: "You successfully submit the following choices ..."
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top