Jump to content

BillingAgreement Tasks Not Running Error


TheEnd-

Recommended Posts

Posted

Hi,

I received a notification at the top of my ACP the other day stating:

Quote

The following tasks appear to be locking frequently: billingAgreements.

 

I ran the task manually, and an error was given:

TypeError: Argument 2 passed to IPS\nexus\Invoice\_Item::__construct() must be an instance of IPS\nexus\Money, null given, called in /home/bit/public_html/community/applications/nexus/sources/Invoice/Item/Renewal.php on line 61 (0)
#0 /home/bit/public_html/community/applications/nexus/sources/Invoice/Item/Renewal.php(61): IPS\nexus\Invoice\_Item->__construct('Renew: 1 Month ...', NULL)
#1 /home/bit/public_html/community/applications/nexus/tasks/billingAgreements.php(85): IPS\nexus\Invoice\Item\_Renewal::create(Object(IPS\nexus\Purchase))
#2 /home/bit/public_html/community/system/Task/Task.php(249): IPS\nexus\tasks\_billingAgreements->execute()
#3 /home/bit/public_html/community/applications/core/modules/admin/settings/advanced.php(545): IPS\_Task->run()
#4 [internal function]: IPS\core\modules\admin\settings\_advanced->runTask()
#5 /home/bit/public_html/community/system/Dispatcher/Controller.php(85): call_user_func(Array)
#6 /home/bit/public_html/community/applications/core/modules/admin/settings/advanced.php(35): IPS\Dispatcher\_Controller->execute()
#7 /home/bit/public_html/community/system/Dispatcher/Dispatcher.php(129): IPS\core\modules\admin\settings\_advanced->execute()
#8 /home/bit/public_html/community/bpadmd/index.php(13): IPS\_Dispatcher->run()
#9 {main}

 

Posted
12 hours ago, TheEnd- said:

Argument 2 passed to IPS\nexus\Invoice\_Item::__construct() must be an instance of IPS\nexus\Money,

do you have a custom plugin that would potentially hook into commerce? I had a similar issue when I made a custom action that hooked into commerce purchases, it was because I hooked into something wrong.

  • 2 months later...
Posted
On ‎1‎/‎5‎/‎2017 at 1:01 AM, TheEnd- said:

Hi,

I received a notification at the top of my ACP the other day stating:

 

I ran the task manually, and an error was given:


TypeError: Argument 2 passed to IPS\nexus\Invoice\_Item::__construct() must be an instance of IPS\nexus\Money, null given, called in /home/bit/public_html/community/applications/nexus/sources/Invoice/Item/Renewal.php on line 61 (0)
#0 /home/bit/public_html/community/applications/nexus/sources/Invoice/Item/Renewal.php(61): IPS\nexus\Invoice\_Item->__construct('Renew: 1 Month ...', NULL)
#1 /home/bit/public_html/community/applications/nexus/tasks/billingAgreements.php(85): IPS\nexus\Invoice\Item\_Renewal::create(Object(IPS\nexus\Purchase))
#2 /home/bit/public_html/community/system/Task/Task.php(249): IPS\nexus\tasks\_billingAgreements->execute()
#3 /home/bit/public_html/community/applications/core/modules/admin/settings/advanced.php(545): IPS\_Task->run()
#4 [internal function]: IPS\core\modules\admin\settings\_advanced->runTask()
#5 /home/bit/public_html/community/system/Dispatcher/Controller.php(85): call_user_func(Array)
#6 /home/bit/public_html/community/applications/core/modules/admin/settings/advanced.php(35): IPS\Dispatcher\_Controller->execute()
#7 /home/bit/public_html/community/system/Dispatcher/Dispatcher.php(129): IPS\core\modules\admin\settings\_advanced->execute()
#8 /home/bit/public_html/community/bpadmd/index.php(13): IPS\_Dispatcher->run()
#9 {main}

 

What was the fix for this?

Posted
On 3/9/2017 at 2:53 PM, Mike Sullivan said:

What was the fix for this?

Hi Mike,

I submitted a support ticket because I was not able to find the cause on my own. Support stated the following:

Quote

The issue is some of the purchases have invalid renewal terms. For example the customer "name_redacted" has a 1 month subscription purchase set to renew every 0 months.

Another reply to the ticket stated:

Quote

One of your purchases was stored badly in the database (it was set to $1 every 0 months) which was causing an error. I'm honestly not sure how that could have happened, but I've fixed it and the task is now running correctly - let me know if it happens again.

 

To summarize: somehow one of my customers' subscriptions was stored as a zero value in the database, causing the task to fail while running. Hopefully this helps you!

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...