Skip to Content Skip to Menu

🌟 CB Editor Assistant 1.0.0 is here! Discover our new AI Joomla Plugin that wrote its story! (and this banner!)
Start at just $12.50/month* or 💸 save 30% with our 🛍️ Intro Black Friday Offer for a lifetime*

Access across different CB sites

  • micheleq
  • micheleq
  • OFFLINE
  • Posts: 144
  • Thanks: 22
  • Karma: 6
5 years 4 months ago - 5 years 4 months ago #313258 by micheleq
Replied by micheleq on topic Access across different CB sites
Hi Kyle,
I am using the CB Login module. I have 2 auto actions and I've switched them from subscribe to unsubscribe, and the unsubscribe continued to work while the subscribe continued to not work. So that ruled out anything in the setting of the Auto Action instance itself.
This makes me think that a user on logging in, who doesn't have a membership, one of the processes exits the chain of actions and so the Auto Action is prevented from getting triggered.
Does this make sense?
That being the case, I'd have to figure out a different trigger event.
Thanks.

To be clear, this is what I'm trying to achieve:
  • An existing user without a membership
  • A CB Query Field returning 1 or 0
  • On login, an Auto Action signs the user up to a membership plan if Query returns 1.
I can't get that to work.
Last edit: 5 years 4 months ago by micheleq.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48551
  • Thanks: 8291
  • Karma: 1445
5 years 4 months ago - 5 years 4 months ago #313264 by krileon
Replied by krileon on topic Access across different CB sites

This makes me think that a user on logging in, who doesn't have a membership, one of the processes exits the chain of actions and so the Auto Action is prevented from getting triggered.

Only way that could happen is if the user object was modified and lost its user id or the previous auto action caused a redirect.

To be clear, this is what I'm trying to achieve:

An existing user without a membership
A CB Query Field returning 1 or 0
On login, an Auto Action signs the user up to a membership plan if Query returns 1.

The below should work perfectly fine.

Global
Triggers: onAfterLogin
Type: CB Paid Subscriptions
User: Automatic
Access: Everybody
Conditions
QUERY_FIELD Equal To 1
Action
Mode: Subscribe
Plans: YOUR_PLANS

If it's not working enabled debug mode under Parameters then enable debug mode and maximum error reporting in Joomla global configuration. This should cause it to output a Joomla message queue message about what failed if something failed, which is usually the condition as your query field may not be outputting as expected or it may not be as accessible as needed.


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.
Last edit: 5 years 4 months ago by krileon.

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

  • micheleq
  • micheleq
  • OFFLINE
  • Posts: 144
  • Thanks: 22
  • Karma: 6
5 years 4 months ago #313275 by micheleq
Replied by micheleq on topic Access across different CB sites
Here are the results of my debug test, before these tests:
- All other custom Auto Actions were disabled
- Cleared Cache (server and browser)
- When executing the logins, the conditions were set for the active Auto Action to execute

These are the results of the login when the Unsubscribe Auto Action was enabled (only one enabled) and the user was set to be Unsubscribed from the plan
Warning: Spoiler!

Result: The user was unsubscribed (as it should) and redirected to the home page without a message and logged out.



These are the results of the login when the Subscribe Auto Action was enabled (only one enabled) and the user was set to be Subscribed to the plan

Warning: Spoiler!


Result: Nothing different. Notice "A membership is needed for access." Should have subscribe the user and logged in, but didn't.

I tried with subscriptions that were available in the front end.


Thanks,
Tomas

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48551
  • Thanks: 8291
  • Karma: 1445
5 years 4 months ago #313283 by krileon
Replied by krileon on topic Access across different CB sites
"A membership is needed for access" is the access denied message CBSubs displays when it blocks access to something. Are you protecting the entire CB component with CBSubs? Do not do this. It will prevent all access to CB. The access denied redirect is happening before your auto action and is why it isn't working.


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