Skip to Content Skip to Menu

[SOLVED] redirect on login not working

  • comyoo
  • comyoo
  • OFFLINE
  • Posts: 87
  • Thanks: 1
  • Karma: 0
10 years 1 month ago - 10 years 1 month ago #249448 by comyoo
Hi,

We use a redirect on login Auto Action, but it is not working.

we want to redirect to the page the person wanted to go, but he had to login first.

Message is shown, but return or goback2 or goback1 not working. A hardcoded url like /contact is working well.
Last edit: 10 years 1 month ago by krileon.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48479
  • Thanks: 8283
  • Karma: 1443
10 years 1 month ago #249461 by krileon
Replied by krileon on topic redirect on login not working
The goback does a javascript history back. If there's no browser history or not HTML output at the location of the trigger then that won't work. The reload will just reload the existing page using javascript location reload, but it has same issue of goback (needs a page that allows HTML output). The return usage will do an actual PHP redirect, but it just returns to the page the trigger fired on and in the case of login that's the login page, which isn't allowed. So what you're wanting isn't really doable without a custom plugin to act on the login triggers and adjust the return URL.

You shouldn't need any of this though as CB already returns the user to their previous location if you leave the login redirect empty in your login module. This works best by setting the login module to show on all pages. The login page typically can not return to a previous location as the login page is the previous location (the module encodes the URL it's currently on and sends it as the return).


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 or Create an account to join the conversation.

  • comyoo
  • comyoo
  • OFFLINE
  • Posts: 87
  • Thanks: 1
  • Karma: 0
10 years 1 month ago #249527 by comyoo
Replied by comyoo on topic redirect on login not working
Hi Krileon,

Thanks for your reply.

When you have to login, you are redirected to a login page, but that is not a seperate module, but in 'component'.

So when we go to de4emusketier.nl/mijn-profiel (myprofile), you have to login, but when you login, you are redirected to homepage.

Where do we have to put an module? Because this login page is automatically created from component.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48479
  • Thanks: 8283
  • Karma: 1443
10 years 1 month ago #249543 by krileon
Replied by krileon on topic redirect on login not working
You can't redirect back to previous location from the login page as the return URL becomes the login page. There's no way to go further back without caching the previous URL in the session on every single page load, which would be bad to do (altering session per page load isn't good). The redirect behavior it self would need to be able to send a GET variable of the previous URL, but that it self could also cause issues (all redirects would have massive URLs, also not good).


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 or Create an account to join the conversation.

  • comyoo
  • comyoo
  • OFFLINE
  • Posts: 87
  • Thanks: 1
  • Karma: 0
10 years 1 month ago - 10 years 1 month ago #249569 by comyoo
Replied by comyoo on topic redirect on login not working
Hi Kyle,


If you go directly to a page behind login, you have to login, so you are redirected to login. But our visitors needs to be redirected to the page they wanted to see.

But I thought that is standard joomla functionality. Why isn't that available into CB?

Or am I wrong?
Last edit: 10 years 1 month ago by comyoo. Reason: made my question more clear

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48479
  • Thanks: 8283
  • Karma: 1443
10 years 1 month ago #249601 by krileon
Replied by krileon on topic redirect on login not working
If you're being redirected to login you likely have CB Core Redirect installed as you'd normally see a Joomla login page. In this case it should take the return URL that is given to Joomlas login page and send it to CBs login page, but I think that's bugged in CB Core Redirect and is already fixed in CB 2.0. If possible clone your site and re-test this behavior with CB 2.0 to see if you get the expected behavior.


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 or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum