[SOLVED] Logout redirect not working

4 years 10 months ago - 4 years 10 months ago #312707 by Vorak
Hello,

I know I had this issue before some years ago, but I can't remember how it was eventually fixed back then, and a search for topics with the same issue on these forums hasn't helped me. The problem is this:

I use the CB Login module to let users login and logout. The redirect on login always works perfectly. However, the one on logout does not - it just redirects the user to the default page instead.

The logout redirect worked fine for quite some time though, but yesterday it stopped working (at least that I noticed). All I had done was add an additional CB Login module (a copy from an existing one that had been working just fine) for the mobile version of the website. However, Mobile Joomla was already installed on my site before and the only reason I had added the module was because I switched to another mobile template. On the main version (desktop version) of the site I had not changed anything. Then I noticed that the logout redirect didn't work on the CB Login module I use for mobile - but at the same time, the logout redirect also doesn't work anymore on the CB Login module for the desktop site (the one I have been using for some years and to which I have not made any changes).

Do you have any idea where I should look to find the cause of this issue?

Thanks.

Please Log in to join the conversation.

4 years 10 months ago #312717 by krileon
Replied by krileon on topic Logout redirect not working
Seams to be working fine in my tests. Ensure you've supplied a non-SEF URL beginning with index.php as your logout redirect URL to ensure Joomla can reliably path to where you want them to go. Next ensure you're logging out with your CB Login Module as the logout redirect URL will not work with Joomla menu item to CBs logout endpoint.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

4 years 10 months ago - 4 years 10 months ago #312721 by Vorak
Replied by Vorak on topic Logout redirect not working
Hello,

Thanks for your reply, I have been able to resolve it.

It turned out that Joomdle (bridge extension for Joomla-Moodle) was the cause. I had found this out almost two years ago as well, and had posted about it on the Joomdle support forums. I just totally forgot I had done that, shortly afterwards my personal life became very hectic. But just in case anyone else might experience the same issue (or if this happens to me again in a few years and by then I forgot again lol), I'll post the solution here.

If Joomla and Moodle are on the same domain (which is the case for me) and cURL is enabled, you need to enable "redirectless logout" in Joomdle's configuration in Joomla.

The issue resurfaced now since I have Mobile Joomla configured to have mobile users go to the m. of my domain instead of www.
For that reason, I had disabled the "redirectless logout" again (not remembering why I had enabled it in the first place). Re-enabling apparently doesn't interfere with Joomdle, even when Joomla is being accessed on the m. subdomain (and Moodle still on the www.).
The redirect on logout, however, created an incorrect URL and therefore a 404 page (only when on the mobile subdomain though). This however can be fixed by making sure that the logout URL in the CB Login module (the one used for the mobile site) is the non-SEF URL starting with index.php.

In fact (and this is just a sidenote), providing a SEF-url for logout redirection in the CB Login works in itself just fine. Only in my case, on the mobile version of Joomla I have to provide a non-SEF url due to Joomla.

Thanks for your help - and hopefully this information might also be helpful to others.
The following user(s) said Thank You: krileon

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.607 seconds

Facebook Twitter LinkedIn