Skip to Content Skip to Menu

CB Subs Mass Expire cron not working

  • krileon
  • krileon
  • ONLINE
  • Posts: 48548
  • Thanks: 8290
  • Karma: 1445
8 years 4 months ago #283804 by krileon
Replied by krileon on topic CB Subs Mass Expire cron not working
Enable debug mode and maximum error reporting in Joomla global configuration then remove &format=raw from the expiration URL and see if any errors are present on the page when using the URL. Don't see how domain would have any affect on this functioning.


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.

  • stuntlist
  • stuntlist
  • OFFLINE
  • Posts: 93
  • Thanks: 4
  • Karma: 0
8 years 4 months ago #283807 by stuntlist
Replied by stuntlist on topic CB Subs Mass Expire cron not working
Hi Kyle,

Thank you for the suggestion. When I do as you suggested this is what shows:
Code:
CBPaid Debug Message NOTICE: Trying to get property of non-object in /home/staging6/public_html/components/com_comprofiler/plugin/user/plug_cbpaidsubscriptions/products/usersubscription/cbpaidUsersubscriptionRecord.php on line 881 Trace:called in class cbpaidErrorHandler::_error_handler_callable(8, "Trying to get property of non-object", "/home/staging6/public_html/components/com_comprofiler/plugin/user/plug_cbpaidsubscriptions/products/usersubscription/cbpaidUsersubscriptionRecord.php", 881, array("user" => object(CB\Database\Table\UserTable), "newStatus" => "X", "_CB_database" => object(CBLib\Database\Driver\CmsDatabaseDriver), "dateNow" => "2016-07-15 20:49:44", "paidSomethingMgr" => object(cbpaidSomethingMgr), "subscription" => NULL)) on line 881 in file cbpaidUsersubscriptionRecord.php called in class cbpaidUsersubscriptionRecord::deactivate(object(CB\Database\Table\UserTable), "X") on line 771 in file cbpaidUsersubscriptionRecord.php called in class cbpaidUsersubscriptionRecord::expireIfExpired() on line 251 in file cbpaidUserExtension.php called in class cbpaidUserExtension::checkUserSubscriptions(false, NULL, "X", true) on line 286 in file cbpaidProductUsersubscription.php called in class cbpaidProductUsersubscription::checkAllSubscriptions(100) on line 191 in file cbpaidPlansMgr.php called in class cbpaidPlansMgr::checkAllSubscriptions(100) on line 202 in file cbpaidControllerCBComponent.php called in class CBplug_cbpaidsubscriptions::getCBpluginComponent(NULL, NULL, 1, array()) called in function call_user_func_array(array(0 => object(CBplug_cbpaidsubscriptions), 1 => "getCBpluginComponent"), array(0 => NULL, 1 => NULL, 2 => 1, 3 => array())) on line 881 in file cbPluginHandler.php called in class cbPluginHandler::call("517", "getCBpluginComponent", "CBplug_cbpaidsubscriptions", array(0 => NULL, 1 => NULL, 2 => 1, 3 => array()), NULL) on line 1369 in file cbTabs.php called in class cbTabs::_callTabPlugin(NULL, NULL, "CBplug_cbpaidsubscriptions", "getCBpluginComponent", "517", array()) on line 1483 in file cbTabs.php called in class cbTabs::tabClassPluginTabs(NULL, array(), "cbpaidsubscriptions", "CBplug_cbpaidsubscriptions", "getCBpluginComponent") on line 710 in file comprofiler.php called in function tabClass("com_comprofiler", "pluginclass", 0) on line 271 in file comprofiler.php called in function require_once("/home/staging6/public_html/components/com_comprofiler/comprofiler.php") on line 405 in file helper.php called in class JComponentHelper::executeComponent("/home/staging6/public_html/components/com_comprofiler/comprofiler.php") on line 380 in file helper.php called in class JComponentHelper::renderComponent("com_comprofiler") on line 191 in file site.php called in class JApplicationSite::dispatch() on line 230 in file site.php called in class JApplicationSite::doExecute() on line 257 in file cms.php called in class JApplicationCms::execute() on line 49 in file index.php $_GET = array ( 'option' => 'com_comprofiler', 'task' => 'pluginclass', 'plugin' => 'cbpaidsubscriptions', 'do' => 'massexpire', 'key' => 'd41d8cd98f00b204e9800998ecf8427e', 'Itemid' => NULL, 'view' => 'pluginclass', ) $_POST = array ( ) Notice: Trying to get property of non-object in /home/staging6/public_html/components/com_comprofiler/plugin/user/plug_cbpaidsubscriptions/products/usersubscription/cbpaidUsersubscriptionRecord.php on line 881

Any ideas why all these Notices?

Thank you for your help!

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48548
  • Thanks: 8290
  • Karma: 1445
8 years 4 months ago #283863 by krileon
Replied by krileon on topic CB Subs Mass Expire cron not working
Line 881 is if ( $subscription->status == 'U' ) {. this means $subscription is returning as null. So it's trying to run ->deactivate on a non-existent subscription. This is likely due to a bad subscription row in the _cbsubs_subscriptions database table for a plan that no longer exists. Ensure all the rows in _cbsubs_subscriptions have valid plan_id, parent_id, and replaces_plan (by valid I mean those plan ids should exist in _cbsubs_plans).


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.

  • stuntlist
  • stuntlist
  • OFFLINE
  • Posts: 93
  • Thanks: 4
  • Karma: 0
8 years 4 months ago - 8 years 4 months ago #283866 by stuntlist
Replied by stuntlist on topic CB Subs Mass Expire cron not working
Hi Kyle,

We have plans with ids 1 to 9 and all are published.

I looked at the cbsubs_subscriptions table in the database. All the records in the table has a plan_id between 1 and 9. But there are 34 pages of records that have parent_plan of 0 (none greater than 9 and none that are NULL) and 55 pages of records that have a replaces_plan of NULL (none that are > 9 or 9 or t 31 pages of records that have a parent_plan = 0 and 52 pages of records that have replaces_plan of NULL.

On the staging site I changed replaces_plan to 1 on the U record and then I didn't get any errors/notices/warnings showing and 3 subscriptions got expired.

So, it looks like that has solved the problem on the staging site.

But on the live site we have 2 U subscription records and both of them have replaces_plan set to NULL. So when we upgrade the live site to 4.1.0 I assume that we will have the same issue as the staging site. It looks like something has changed with the mass expiry routines between 4.0.2 and 4.1.0 that it no longer accepts NULL for the replaces_plan.

Should we be worried about all the records that have a parent_plan of 0 and a replaces_plan of NULL? If so what do you suggest that we do?

Thank you for your help.
Last edit: 8 years 4 months ago by stuntlist. Reason: More info about 4.0.2 and 4.1.0 difference in mass expiry

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

  • beat
  • beat
  • ONLINE
  • Posts: 2169
  • Thanks: 463
  • Karma: 352
8 years 4 months ago #283880 by beat
You can safely ignore the notices. And if you delete a subscription then you should have corresponding replaces_plan and replaces_subscription record of the subscriptions to which they are upgraded should be 0.

I have fixed the notices to ignore non-existent subscriptions after upgrades for next nightly.

#6109

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info

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

  • stuntlist
  • stuntlist
  • OFFLINE
  • Posts: 93
  • Thanks: 4
  • Karma: 0
8 years 4 months ago #283881 by stuntlist
Hi,

Thank you for fixing the problem.

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

Moderators: beatnantkrileon
Powered by Kunena Forum