[SOLVED] [cb:config param="lang_tag" /] unpredictable behaviour

10 years 4 months ago - 10 years 4 months ago #237693 by erichf
I'm using autoactions to redirect users logging in to different pages based on their languages. Using Joomfish for translations (I know you don't support Joomfish but I don't think it's the issue in the this case).

I need three actions, one for each of en-GB, en-US, fr-FR.

I First created the French auto action and users logging in when the site is in French are properly redirect. Users on the English site who log in just return to the page they were on as expected.

Then I created the two English auto actions. Now, all users logging in are redirected to the french page even though the autoaction is redirecting to an English page.

I changed the order of the autoactions so that the French rule is last of the three and now the English redirects work properly and the French redirects work properly.

Any explanation as to why the order of the autoactions would affect the behaviour?

Thanks

Erich

Please Log in to join the conversation.

10 years 4 months ago #237696 by krileon
My guess is you created 3 auto actions that act on the same trigger and all cause a redirect without giving them any conditionals. This means only the first of the 3 can actually execute. Auto action order is load order so the first one is loaded into trigger memory first and will fire first. You need to give them conditionals to check their language so only the correct one will fire.


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.

10 years 4 months ago #237699 by erichf
I didn't see the issue until I did screen shots of each of the action screen and had them all one on top of the other in photoshop.

The issue was that the French action had the following conditional:
[cb:config param="lang_tag" /] -Select Operator- fr-FR
rather than
[cb:config param="lang_tag" /] Equal To fr-FR

So, my mistake in creating the autoaction incorrectly.

Shouldn't this have generated an error though since "Select Operator" isn't a valid conditional selection?
The following user(s) said Thank You: krileon

Please Log in to join the conversation.

10 years 4 months ago #237708 by krileon
No, select operator isn't invalid. It just turns the conditional off. Latest release of CB Auto Actions would've hidden the left and right value if it was set to Select Operator though so ensure you're using latest.


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.

10 years 4 months ago #237712 by erichf
I didn't realize my autoactions was out of date. I've updated to 5.1.3. Hiding the fields makes it much obvious that the conditional isn't active.

Thanks

Erich
The following user(s) said Thank You: krileon

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.298 seconds

Facebook Twitter LinkedIn