[SOLVED] CBSubs: CB Fields integration not working on deactivation

8 years 2 months ago #278576 by lousyfool
Oh Kyle...

Me again :S

I was too fast, it wasn't solved, yet. Any unsubscribing of a plan in the frontend, by either user or moderator, would not result in the "Plan Expired" Auto Action to be successful, the field value wouldn't change.

Tired of it, I've now scrapped all related CB Fields integration and Auto Actions, and instead solely rely on SQL Actions in the plans, for example...

...for activation and renewal:
UPDATE `#__comprofiler` SET `cb_paa` = '1' WHERE `id` = [user_id]

...for expiration and deactivation:
UPDATE `#__comprofiler` SET `cb_paa` = '0' WHERE `id` = [user_id]

I know, the manual says it shouldn't be used for modding #__comprofiler, but I can't see how this could hurt.

Case finally closed - thanks again!

Please Log in to join the conversation.

8 years 2 months ago #278580 by sarah963
OK, glad to know that I did not lose my mind!!
I have been trying to have that cb auto action to work all day but it never worked.

What is the 'var2' set for, by the way? Is it for plan active or not active?
Does not matter how it is deactivated, either unsubscribed, expired, or whatever?

Please Log in to join the conversation.

8 years 2 months ago - 8 years 2 months ago #278594 by krileon
Ok, I see why it's not functioning sometimes. CBSubs is only loading its own plugins. It's not loading the global user scope of plugins. Meaning when onCPayUserStateChange is firing CB Auto Actions isn't being loaded. Depending on what's installed/configured it could already be loaded though. I've created a bug ticket to fix this for next nightly as it's rather urgent issue causing CB Auto Actions to unreliably act on onCPayUserStateChange.

#5824


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.
The following user(s) said Thank You: lousyfool

Please Log in to join the conversation.

8 years 2 months ago #278612 by lousyfool
Thanks for the clarification, Kyle!

Please Log in to join the conversation.

8 years 2 months ago #278617 by krileon
You can quickfix this issue in CBSubs with the below change.

IN: components/com_comprofiler/plugin/user/plug_cbpaidsubscriptions/models/something/cbpaidSomething.php
ON: Line 730
FROM:
$_PLUGINS->loadPluginGroup( 'user', 'cbsubs.' );
TO:
$_PLUGINS->loadPluginGroup( 'user' );


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.

8 years 2 months ago #278653 by lousyfool

krileon wrote: You can quickfix this issue in CBSubs with the below change.


Thanks - good stuff, simple enough, and maybe it's something for "sarah963" or others. With my SQL Actions working, I might leave it there until some point later.

On your note, I could think of more Auto Actions with CBSubs which I also didn't get to work, so I also had to use SQL Actions with slightly more tricky queries (this was about CBSubs and CB Activity).

But again, with all these SQL Actions working for me, I now need to focus on other to-do's in the project... ;)

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.228 seconds

Facebook Twitter LinkedIn