This is a Drupal 7+CiviCRM deployment. Trying to upgrade to 5.5.3 - we're getting this error that stops the upgrade script. Is there a database value I can edit to skip over this to proceed with the upgrade?

[Error: Remove Moneris]
CiviCRM_API3_Exception: "Could not delete payment processor type"

#0 X:\test\temp\sites\all\modules\civicrm\CRM\Upgrade\Incremental\Base.php(129): civicrm_api3("PaymentProcessorType", "delete", (Array:1))
#1 [internal function](): CRM_Upgrade_Incremental_Base::removePaymentProcessorType(Object(CRM_Queue_TaskContext), "Moneris")
#2 X:\test\temp\sites\all\modules\civicrm\CRM\Queue\Task.php(88): call_user_func_array((Array:2), (Array:2))
#3 X:\test\temp\sites\all\modules\civicrm\CRM\Queue\Runner.php(214): CRM_Queue_Task->run(Object(CRM_Queue_TaskContext))
#4 X:\test\temp\sites\all\modules\civicrm\CRM\Queue\Page\AJAX.php(52): CRM_Queue_Runner->runNext(TRUE)
#5 X:\test\temp\sites\all\modules\civicrm\CRM\Queue\ErrorPolicy.php(106): CRM_Queue_Page_AJAX::{closure}()
#6 X:\test\temp\sites\all\modules\civicrm\CRM\Queue\Page\AJAX.php(54): CRM_Queue_ErrorPolicy->call(Object(Closure))
#7 [internal function](): CRM_Queue_Page_AJAX::runNext()
#8 X:\test\temp\sites\all\modules\civicrm\CRM\Core\Invoke.php(275): call_user_func((Array:2))
#9 X:\test\temp\sites\all\modules\civicrm\CRM\Core\Invoke.php(84): CRM_Core_Invoke::runItem((Array:13))
#10 X:\test\temp\sites\all\modules\civicrm\CRM\Core\Invoke.php(52): CRM_Core_Invoke::_invoke((Array:5))
#11 X:\test\temp\sites\all\modules\civicrm\drupal\civicrm.module(445): CRM_Core_Invoke::invoke((Array:5))
#12 [internal function](): civicrm_invoke("upgrade", "queue", "ajax", "runNext")
#13 X:\test\temp\includes\menu.inc(527): call_user_func_array("civicrm_invoke", (Array:4))
#14 X:\test\temp\index.php(21): menu_execute_active_handler()
#15 {main}

----- UPDATE -------

So we restarted the entire upgrade - manually deleted Moneris, and commented out line 193 as suggested by Jon G, but the script seems to stubbornly want to do its own thing. This is the error now:

[Error: Remove Moneris]
CiviCRM_API3_Exception: "Unexpected result from getcountArray ( [error_field] => payment_processor_type_id [error_code] => 2001 [entity] => PaymentProcessor [action] => get [is_error] => 1 [error_message] => 'Moneris' is not a valid option for field payment_processor_type_id ) "

0 X:\test\temp\sites\all\modules\civicrm\CRM\Upgrade\Incremental\Base.php(122): civicrm_api3("PaymentProcessor", "getcount", (Array:1))
1 [internal function](): CRM_Upgrade_Incremental_Base::removePaymentProcessorType(Object(CRM_Queue_TaskContext), "Moneris")
2 X:\test\temp\sites\all\modules\civicrm\CRM\Queue\Task.php(88): call_user_func_array((Array:2), (Array:2))
3 X:\test\temp\sites\all\modules\civicrm\CRM\Queue\Runner.php(214): CRM_Queue_Task->run(Object(CRM_Queue_TaskContext))
4 X:\test\temp\sites\all\modules\civicrm\CRM\Queue\Page\AJAX.php(52): CRM_Queue_Runner->runNext(TRUE)
5 X:\test\temp\sites\all\modules\civicrm\CRM\Queue\ErrorPolicy.php(106): CRM_Queue_Page_AJAX::{closure}()
6 X:\test\temp\sites\all\modules\civicrm\CRM\Queue\Page\AJAX.php(54): CRM_Queue_ErrorPolicy->call(Object(Closure))
7 [internal function](): CRM_Queue_Page_AJAX::runNext()
8 X:\test\temp\sites\all\modules\civicrm\CRM\Core\Invoke.php(275): call_user_func((Array:2))
9 X:\test\temp\sites\all\modules\civicrm\CRM\Core\Invoke.php(84): CRM_Core_Invoke::runItem((Array:13))
10 X:\test\temp\sites\all\modules\civicrm\CRM\Core\Invoke.php(52): CRM_Core_Invoke::_invoke((Array:5))
11 X:\test\temp\sites\all\modules\civicrm\drupal\civicrm.module(445): CRM_Core_Invoke::invoke((Array:5))
12 [internal function](): civicrm_invoke("upgrade", "queue", "ajax", "runNext")
13 X:\test\temp\includes\menu.inc(527): call_user_func_array("civicrm_invoke", (Array:4))
14 X:\test\temp\index.php(21): menu_execute_active_handler()
15 {main}

1 Answer 1


This error relates to the fact that there used to be payment processor code in CiviCRM core to support the Moneris payment processor. If you don't interact with Moneris, this is fairly safe to ignore. However, I suspect the error may mean you use Moneris, in which case I would NOT follow the instructions below.

  • In your CiviCRM folder, find the file located at CRM/Upgrade/Incremental/php/FourSeven.php.
  • Delete line 193. Confirm it matches the line 193 linked here.
  • Run the upgrade again.

Note that it's common to experience upgrade errors because you have a partially upgraded database - so be sure to restore the pre-upgrade database backup to minimize your upgrade pain.

  • See edit to question - we did as advised, but got a new error. The upgrade script appears to want to still remove Moneris even if Moneris no longer exists. Commented Oct 3, 2018 at 19:52
  • Edit: it appears we forgot to delete line 193 in CRM/Upgrade/Incremental/php/FourSeven.php when refreshing the site and trying to re-run the upgrade. Commented Oct 3, 2018 at 20:03
  • Hi Alex! I think from your second comment your upgrade was successful; please comment again if that's not the case. Commented Oct 3, 2018 at 21:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.