Trigger "XXXlogout" not working

4 years 4 days ago - 4 years 4 days ago #317290 by smalldragoon
Trigger "XXXlogout" not working was created by smalldragoon
Hi,
I want to trigger an action at user logout.
tried several triggers, but none is working, so I guess there is a config issue ( please see my screenshot )
maybe the user config ( not automatic as it is logged out ? )
Of course no condiftion is defined
Thanks
Attachments:

Please Log in to join the conversation.

4 years 4 days ago #317296 by krileon
Replied by krileon on topic Trigger "XXXlogout" not working
Trigger what action? The type you have selected is Action, which is used to directly execute another Auto Action. The access and conditions of the action selected will still be checked. What are you wanting to do after logout specifically? onAfterUserLogoutSuccess should be sufficient if you just want to do a redirect for example, but if you need access to the users information you'll have to use onAfterLogout.


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 4 days ago - 4 years 4 days ago #317301 by smalldragoon
Replied by smalldragoon on topic Trigger "XXXlogout" not working
Hi,
Idea was to "organize" a little bit my different autoactions.
the 2 others actions are "code" ones ( 1 to clear cookies + 1 action in PHP, 2nd one is to clear local_storage + 1 action in PHP )
but I set no trigger... I guess this is why

Please Log in to join the conversation.

4 years 4 days ago #317302 by krileon
Replied by krileon on topic Trigger "XXXlogout" not working
I would just combine those into a single auto action and act on onAfterUserLogoutSuccess. Attempting to organize like that actually slows it down as more actions = more processing and increases the complexity of what the actions are trying to do. You're essentially using 3 auto actions that a single auto action can accomplish. If you need it to act on more triggers don't create more auto actions but instead just add more triggers to the existing one.


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 4 days ago - 4 years 4 days ago #317305 by smalldragoon
Replied by smalldragoon on topic Trigger "XXXlogout" not working
I just tried one the action directly, with "onAfterUserLogoutSuccess" as trigger.
Still no condition of course.
code is javascript ( to delete cookie )
When I test ( removing the trigger as mentiopnned ) , it works
live, with trigger defined and logging out, nothing happens
Attachments:

Please Log in to join the conversation.

4 years 3 days ago #317312 by krileon
Replied by krileon on topic Trigger "XXXlogout" not working

code is javascript ( to delete cookie )

That's your issue. Javascript can only function where it outputs. You're trying to act on an event that's during a PHP process. It doesn't output anything there so your Javascript will never execute. You'd need to execute your javascript on your logout landing page, which could be an auto action if Triggers is left as None and you configure your logout redirect URL to be the auto action URL (this is provided under the Global tab of your auto action).


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.

Moderators: beatnantkrileon
Time to create page: 0.230 seconds

Facebook Twitter LinkedIn