[SOLVED] Auto-Action: onAfterLogin does not trigger action

6 years 3 months ago - 6 years 3 months ago #301363 by wbuk
We were wondering if anyone has any idea what's wrong.

We are having issues with auto-action not being triggered by user logging in, using trigger onAfterLogin, regardless of any action set. Changing it to other triggers (such as onAfterLogout) works fine.

We have tried turning off all other auto-actions, leaving only one with the trigger onAfterLogin, and still it won't trigger. There isn't any error message on debugging either.

Edit: The actions we have been trying to set include setting a custom profile field, redirecting a usergroup to a certain page, making a user join a group automatically, etc.

Web Buster UK Ltd

Please Log in to join the conversation.

6 years 3 months ago #301368 by krileon
onAfterLogin should work fine as long as the login process completed and wasn't interrupted. Example as follows

Action 1 - Redirect
Action 2 - Field

With the above actions both acting on onAfterLogin the redirect will interrupt the process an action 2 will never execute. Please also be sure you're using CBs login module and not Joomlas or 3rd party login.


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.

6 years 3 months ago - 6 years 3 months ago #301381 by wbuk
We have tried turning off all non-essential plugins and used the original site.com/cb-login URL to log in. Access is set to Everybody and the auto-action is first on the ordering list.

There's no error message on logging in, and the page refreshes on the same URL (ie /cb-login), however the auto-action still doesn't trigger (ie no redirection or any other action). Is there a way to check if there's anything interrupting the login process?

Debugging is on and there is no error message as well.

PS: It had been working up fine till the last month or so. Don't remember installing any new plugin or changed the settings though.

Web Buster UK Ltd

Please Log in to join the conversation.

6 years 3 months ago #301390 by krileon
To debug auto actions enable debug mode and maximum error reporting in Joomla global configuration then within your auto action under Parameters enable debug. If anything in the auto action fails then it will log a message to Joomlas message queue, but during login/logout processes that can be iffy.

Sorry, I don't have any explanation as to why that trigger won't work for you. It wasn't changed and works fine in all my tests. Create an auto action with no conditions, etc.. and redirect to something like index.php with a message set to see if that works. I'm guessing maybe your redirect URL is invalid. Do not use SEF URLs for redirects. Always use the non-SEF of a URL starting with index.php.


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.

6 years 3 months ago - 6 years 3 months ago #301427 by wbuk
Had a look through all the plugins again and found the cause. We were using Joomdle to integrate Joomla and Moodle, which has a plugin which triggers onAfterLogin. It seems this conflicted with CB Auto-Action's onAfterLogin trigger.

Issue is resolved now, many thanks for your help.

Web Buster UK Ltd
The following user(s) said Thank You: krileon

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.300 seconds

Facebook Twitter LinkedIn