Fatal error

10 years 8 months ago #113466 by crony
Fatal error was created by crony
Hello,

I've setuped this:

1-A parent exclusive free plan with a free price per period, validity 10 minutes, max recur 1,price first period -,no initial validity,published,allow new subscriptions,allow registration, no upgrade.

SQL action 1 on deactivation :

[code:1]UPDATE `jos_core_acl_groups_aro_map` SET `group_id` = 33 WHERE `aro_id` = ( SELECT `id` FROM `jos_core_acl_aro` WHERE `value` = [user_id] )[/code:1]

SQL action 2 on deactivation:

[code:1]UPDATE `#__users` SET `usertype` = 'Artisans-unsubscribed', `gid` = '33' WHERE `id` = [user_id];[/code:1]

2-A child plan, wich is used to put users into an "unsubsribed group" (setuped into native groups of Joomla!)
Not exclusive,free,lifetime subscription,unlimited max recur, - price first period,no initial validity,published, allow new subscriptions, not allowing registration (tested with allowing as well, see fatal error below),allow upgrade to this.

SQL action 1 on deactivation:

[code:1]UPDATE `jos_core_acl_groups_aro_map` SET `group_id` = 31 WHERE `aro_id` = ( SELECT `id` FROM `jos_core_acl_aro` WHERE `value` = [user_id] )[/code:1]

SQL action 2 on deactivation:

[code:1]UPDATE `#__users` SET `usertype` = 'Artisans', `gid` = '31' WHERE `id` = [user_id];[/code:1]

Users should be added to this group, while free parent plan is ending (or second child plan). It's because I need to setup additionnal SQL actions, access to some components are not allowed, products from VM are not published...(not setuped yet, but this is what I would like to do)

They could be allowed to subscribe to the next child plan...

3-Child plan, Not exclusive, price per period 9.90,validity 1 month, max recur unlimited, first price period 50,first period validity 1 day,published, allow new subscriptions, allow registration, allow upgrade.

SQL action 1 on deactivation :

[code:1]UPDATE `jos_core_acl_groups_aro_map` SET `group_id` = 33 WHERE `aro_id` = ( SELECT `id` FROM `jos_core_acl_aro` WHERE `value` = [user_id] )[/code:1]

SQL action 2 on deactivation:

[code:1]UPDATE `#__users` SET `usertype` = 'Artisans-unsubscribed', `gid` = '33' WHERE `id` = [user_id];[/code:1]

So after 10 minutes of subscribing the parent plan (while I may upgrade to child paid plan) and stays loggued, I get :

[code:1]Fatal error: Call to undefined function cbFormatDate() in F:\jtest\components\com_comprofiler\plugin\user\plug_cbpaidsubscriptions\cbpaidsubscriptions.class.php on line 0[/code:1]

I log out/login again, no more error, I can't subscribe to 2nd child plan.
Into cbsub, users are not listed into the unsubscribed group plan...(but as cb users, they are into good group.
I don't have that error if 1st child plan is allowing registration.

I guess I'm using sql action as cb url, and it's not correct...I should use cb url, but I think I need a specific development for this. Could we talk about that thru PM ?

Into cbsub log I have 1 Notice undefined property, and Notice undefined variable.

I can send full log, but in private.

Thanks !

J! 2.5.6 - CB 1.8.1 - GroupJive 2.5.3

Please Log in to join the conversation.

10 years 8 months ago #113473 by krileon
Replied by krileon on topic Re:Fatal error
You're manipulating the ACL tables, which is not something to be taken lightly. This is the reason other components which do similar activity as CBSubs have so many problems and cause a nightmare when attempting to remove them or upgrade anything. CB, Joomla, and CBSubs doesn't likely foreign ACL groups. You should wait for Joomla 1.6 in order to properly add new groups.

At any rate you're using SQL Actions outside of its scope. I suggest developing an integration script and executing it with CBSubs URL.


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.391 seconds