CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Alpha and Beta Release Testing »
  • 2.1 Release Testing »
  • 2.1 beta 6 - upgrade fails if eWay payment processor already exists
Pages: [1]

Author Topic: 2.1 beta 6 - upgrade fails if eWay payment processor already exists  (Read 2917 times)

ken

  • I live on this forum
  • *****
  • Posts: 916
  • Karma: 53
    • City Bible Forum
  • CiviCRM version: 4.6.3
  • CMS version: Drupal 7.36
  • MySQL version: 5.5.41
  • PHP version: 5.3.10
2.1 beta 6 - upgrade fails if eWay payment processor already exists
September 24, 2008, 07:03:29 pm
I am using the eWay payment processor, which is being added into the core CiviCRM implementation in v2.1

The upgrade script fails to account for this case.

This is the error generated ...

Quote
backTrace

/var/www/cbfj15/administrator/components/com_civicrm/civicrm/CRM/Core/Error.php, backtrace, 138
, handle,
/var/www/cbfj15/administrator/components/com_civicrm/civicrm/packages/PEAR.php, call_user_func, 912
/var/www/cbfj15/administrator/components/com_civicrm/civicrm/packages/DB.php, PEAR_Error, 966
/var/www/cbfj15/administrator/components/com_civicrm/civicrm/packages/PEAR.php, DB_Error, 574
/var/www/cbfj15/administrator/components/com_civicrm/civicrm/packages/DB/common.php, raiseError, 1903
/var/www/cbfj15/administrator/components/com_civicrm/civicrm/packages/DB/mysql.php, raiseError, 898
/var/www/cbfj15/administrator/components/com_civicrm/civicrm/packages/DB/mysql.php, mysqlRaiseError, 327
/var/www/cbfj15/administrator/components/com_civicrm/civicrm/packages/DB/common.php, simpleQuery, 1216
/var/www/cbfj15/administrator/components/com_civicrm/civicrm/CRM/Utils/File.php, query, 225
/var/www/cbfj15/administrator/components/com_civicrm/civicrm/CRM/Upgrade/Form.php, sourceSQLFile, 75
/var/www/cbfj15/administrator/components/com_civicrm/civicrm/CRM/Upgrade/TwoOne/Form/Step3.php, source, 51
/var/www/cbfj15/administrator/components/com_civicrm/civicrm/CRM/Upgrade/TwoOne/Page/Upgrade.php, upgrade, 65
/var/www/cbfj15/administrator/components/com_civicrm/civicrm/CRM/Upgrade/TwoOne/Page/Upgrade.php, runForm, 41
/var/www/cbfj15/administrator/components/com_civicrm/civicrm/install/upgrade.php, run, 48
/var/www/cbfj15/administrator/components/com_civicrm/civicrm/install/upgrade.php, run, 51

unrecoverable error
    Sorry. A non-recoverable error has occurred.

    DB Error: already exists

    Database Error Code: Duplicate entry 'eWAY' for key 2, 1062

    Return to home page.

Error Details:

Array
(
    [callback] => Array
        (
           
  • => CRM_Core_Error
  • [1] => handle
            )

       
Code: [Select]
=> -5
    [message] => DB Error: already exists
    [mode] => 16
    [debug_info] => INSERT INTO `civicrm_payment_processor_type`
 (name, title, description, is_active, is_default, user_name_label, password_label, signature_label, subject_label, class_name, url_site_default, url_api_default, url_recur_default, url_button_default, url_site_test_default, url_api_test_default, url_recur_test_default, url_button_test_default, billing_mode, is_recur )
VALUES
('eWAY', 'eWAY (Single Currency)',NULL,1,0,'Customer ID',NULL,NULL,NULL,'Payment_eWAY','https://www.eway.com.au/gateway_cvn/xmlpayment.asp',NULL,NULL,NULL,'https://www.eway.com.au/gateway_cvn/xmltest/testpage.asp',NULL,NULL,NULL,1,0) [nativecode=1062 ** Duplicate entry 'eWAY' for key 2]
    [type] => DB_Error
    [user_info] => INSERT INTO `civicrm_payment_processor_type`
 (name, title, description, is_active, is_default, user_name_label, password_label, signature_label, subject_label, class_name, url_site_default, url_api_default, url_recur_default, url_button_default, url_site_test_default, url_api_test_default, url_recur_test_default, url_button_test_default, billing_mode, is_recur )
VALUES
('eWAY', 'eWAY (Single Currency)',NULL,1,0,'Customer ID',NULL,NULL,NULL,'Payment_eWAY','https://www.eway.com.au/gateway_cvn/xmlpayment.asp',NULL,NULL,NULL,'https://www.eway.com.au/gateway_cvn/xmltest/testpage.asp',NULL,NULL,NULL,1,0) [nativecode=1062 ** Duplicate entry 'eWAY' for key 2]
    [to_string] => [db_error: message="DB Error: already exists" code=-5 mode=callback callback=CRM_Core_Error::handle prefix="" info="INSERT INTO `civicrm_payment_processor_type`
 (name, title, description, is_active, is_default, user_name_label, password_label, signature_label, subject_label, class_name, url_site_default, url_api_default, url_recur_default, url_button_default, url_site_test_default, url_api_test_default, url_recur_test_default, url_button_test_default, billing_mode, is_recur )
VALUES
('eWAY', 'eWAY (Single Currency)',NULL,1,0,'Customer ID',NULL,NULL,NULL,'Payment_eWAY','https://www.eway.com.au/gateway_cvn/xmlpayment.asp',NULL,NULL,NULL,'https://www.eway.com.au/gateway_cvn/xmltest/testpage.asp',NULL,NULL,NULL,1,0) [nativecode=1062 ** Duplicate entry 'eWAY' for key 2]"]
)[/quote]

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: 2.1 beta 6 - upgrade fails if eWay payment processor already exists
September 24, 2008, 10:04:48 pm
As you mentioned Eway processor is added in v2.1, hence we have added this to upgrade script. Ideally v2.0 install should not eWay processor.
So you have 2 options.

1. Drop eWay processor from your current v2.0 install. Note that if you choose this, you will have to again configure your online pages for payment processor settings.

2. Remove eWay processor code from upgrade script.
 If you plan to do this, you will have to edit /CRM/Upgrade/TwoOne/sql/misc.mysql

approx. line 592, remove below insert statements.

Quote
-- table civicrm_payment_processor_type, insert ebay record

INSERT INTO `civicrm_payment_processor_type`
 (name, title, description, is_active, is_default, user_name_label, password_label, signature_label, subject_label, class_name, url_site_default, url_api_de\
fault, url_recur_default, url_button_default, url_site_test_default, url_api_test_default, url_recur_test_default, url_button_test_default, billing_mode, is\
_recur )
VALUES
('eWAY', 'eWAY (Single Currency)',NULL,1,0,'Customer ID',NULL,NULL,NULL,'Payment_eWAY','https://www.eway.com.au/gateway_cvn/xmlpayment.asp',NULL,NULL,NULL,'\
https://www.eway.com.au/gateway_cvn/xmltest/testpage.asp',NULL,NULL,NULL,1,0);

After choosing any one of above option, you need to again start upgrade from fresh 2.0 db.

HTH

Kurund

« Last Edit: September 24, 2008, 10:06:48 pm by Kurund Jalmi »
Found this reply helpful? Support CiviCRM

ken

  • I live on this forum
  • *****
  • Posts: 916
  • Karma: 53
    • City Bible Forum
  • CiviCRM version: 4.6.3
  • CMS version: Drupal 7.36
  • MySQL version: 5.5.41
  • PHP version: 5.3.10
Re: 2.1 beta 6 - upgrade fails if eWay payment processor already exists
September 24, 2008, 11:43:02 pm
Dear Kurund,

I was hoping you guys would change the script, but perhaps you have bigger fish to fry at the moment  ;)

I think what I will do is change my payment processor from type "eWay" to type "Dummy" for the duration of the upgrade, remove the eWay processor type via an SQL DELETE, do the upgrade, and then revert the payment processor from "Dummy" to "eWay".

This will save me having to fix up multiple pages.

Thanks,
Ken

Deepak Srivastava

  • Ask me questions
  • ****
  • Posts: 677
  • Karma: 65
Re: 2.1 beta 6 - upgrade fails if eWay payment processor already exists
September 24, 2008, 11:58:20 pm
OR just comment the line trying to insert that record ( file: CRM/Upgrade/TwoOne/sql/misc.mysql, line: 594 to 597 )
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Alpha and Beta Release Testing »
  • 2.1 Release Testing »
  • 2.1 beta 6 - upgrade fails if eWay payment processor already exists

This forum was archived on 2017-11-26.