0

I received this error during installing the "Charity checkout" extension on magento 1.8

a:5:{i:0;s:237:"Error in file: "/home/golbon/domains/golbon.ir/public_html/app/code/local/GoodLabs/CharityCheckout/sql/charitycheckout_setup/mysql4-install-0.1.0.php" - SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'donation_amount'";i:1;s:1092:"#0 /home/golbon/domains/golbon.ir/public_html/app/code/core/Mage/Core/Model/Resource/Setup.php(645): Mage::exception('Mage_Core', 'Error in file: ...')
#1 /home/golbon/domains/golbon.ir/public_html/app/code/core/Mage/Core/Model/Resource/Setup.php(421): Mage_Core_Model_Resource_Setup->_modifyResourceDb('install', '', '0.1.3')
#2 /home/golbon/domains/golbon.ir/public_html/app/code/core/Mage/Core/Model/Resource/Setup.php(327): Mage_Core_Model_Resource_Setup->_installResourceDb('0.1.3')
#3 /home/golbon/domains/golbon.ir/public_html/app/code/core/Mage/Core/Model/Resource/Setup.php(235): Mage_Core_Model_Resource_Setup->applyUpdates()
#4 /home/golbon/domains/golbon.ir/public_html/app/code/core/Mage/Core/Model/App.php(417): Mage_Core_Model_Resource_Setup::applyAllUpdates()
#5 /home/golbon/domains/golbon.ir/public_html/app/code/core/Mage/Core/Model/App.php(343): Mage_Core_Model_App->_initModules()
#6 /home/golbon/domains/golbon.ir/public_html/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#7 /home/golbon/domains/golbon.ir/public_html/index.php(87): Mage::run('', 'store')
#8 {main}";s:3:"url";s:6:"/admin";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:7:"default";}

This is some additional details:

PDOException Object
(
    [message:protected] => SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'donation_amount'
    [string:Exception:private] => 
    [code:protected] => 42S21
    [file:protected] => /home/golbon/domains/golbon.ir/public_html/lib/Zend/Db/Statement/Pdo.php
    [line:protected] => 228
    [trace:Exception:private] => Array
        (
            [0] => Array
                (
                    [file] => /home/golbon/domains/golbon.ir/public_html/lib/Zend/Db/Statement/Pdo.php
                    [line] => 228
                    [function] => execute
                    [class] => PDOStatement
                    [type] => ->
                    [args] => Array
                        (
                            [0] => Array
                                (
                                )

                        )

                )

            [1] => Array
                (
                    [file] => /home/golbon/domains/golbon.ir/public_html/lib/Varien/Db/Statement/Pdo/Mysql.php
                    [line] => 110
                    [function] => _execute
                    [class] => Zend_Db_Statement_Pdo
                    [type] => ->
                    [args] => Array
                        (
                            [0] => Array
                                (
                                )

                        )

                )

            [2] => Array
                (
                    [file] => /home/golbon/domains/golbon.ir/public_html/app/code/core/Zend/Db/Statement.php
                    [line] => 291
                    [function] => _execute
                    [class] => Varien_Db_Statement_Pdo_Mysql
                    [type] => ->
                    [args] => Array
                        (
                            [0] => Array
                                (
                                )

                        )

                )

            [3] => Array
                (
                    [file] => /home/golbon/domains/golbon.ir/public_html/lib/Zend/Db/Adapter/Abstract.php
                    [line] => 479
                    [function] => execute
                    [class] => Zend_Db_Statement
                    [type] => ->
                    [args] => Array
                        (
                            [0] => Array
                                (
                                )

                        )

                )

            [4] => Array
                (
                    [file] => /home/golbon/domains/golbon.ir/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php
                    [line] => 238
                    [function] => query
                    [class] => Zend_Db_Adapter_Abstract
                    [type] => ->
                    [args] => Array
                        (
                            [0] => ALTER TABLE  `golosales_flat_order` ADD  `donation_amount` DECIMAL( 10, 2 ) NOT NULL
                            [1] => Array
                                (
                                )

                        )

                )

            [5] => Array
                (
                    [file] => /home/golbon/domains/golbon.ir/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php
                    [line] => 428
                    [function] => query
                    [class] => Zend_Db_Adapter_Pdo_Abstract
                    [type] => ->
                    [args] => Array
                        (
                            [0] => ALTER TABLE  `golosales_flat_order` ADD  `donation_amount` DECIMAL( 10, 2 ) NOT NULL
                            [1] => Array
                                (
                                )

                        )

                )

            [6] => Array
                (
                    [file] => /home/golbon/domains/golbon.ir/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php
                    [line] => 347
                    [function] => query
                    [class] => Varien_Db_Adapter_Pdo_Mysql
                    [type] => ->
                    [args] => Array
                        (
                            [0] => ALTER TABLE  `golosales_flat_order` ADD  `donation_amount` DECIMAL( 10, 2 ) NOT NULL
                        )

                )

            [7] => Array
                (
                    [file] => /home/golbon/domains/golbon.ir/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php
                    [line] => 617
                    [function] => raw_query
                    [class] => Varien_Db_Adapter_Pdo_Mysql
                    [type] => ->
                    [args] => Array
                        (
                            [0] => ALTER TABLE  `golosales_flat_order` ADD  `donation_amount` DECIMAL( 10, 2 ) NOT NULL
                        )

                )

            [8] => Array
                (
                    [file] => /home/golbon/domains/golbon.ir/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php
                    [line] => 599
                    [function] => multi_query
                    [class] => Varien_Db_Adapter_Pdo_Mysql
                    [type] => ->
                    [args] => Array
                        (
                            [0] => 
    ALTER TABLE  `golosales_flat_order` ADD  `donation_amount` DECIMAL( 10, 2 ) NOT NULL;
    ALTER TABLE  `golosales_flat_order` ADD  `base_donation_amount` DECIMAL( 10, 2 ) NOT NULL;
    ALTER TABLE  `golosales_flat_order` ADD  `donation_amount_invoiced` DECIMAL( 10, 2 ) NOT NULL;
    ALTER TABLE  `golosales_flat_order` ADD  `base_donation_amount_invoiced` DECIMAL( 10, 2 ) NOT NULL;
    ALTER TABLE  `golosales_flat_order` ADD  `donation_amount_refunded` DECIMAL( 10, 2 ) NOT NULL;
    ALTER TABLE  `golosales_flat_order` ADD  `base_donation_amount_refunded` DECIMAL( 10, 2 ) NOT NULL;
    ALTER TABLE  `golosales_flat_quote_address` ADD  `donation_amount` DECIMAL( 10, 2 ) NOT NULL;
    ALTER TABLE  `golosales_flat_quote_address` ADD  `base_donation_amount` DECIMAL( 10, 2 ) NOT NULL;
    ALTER TABLE  `golosales_flat_invoice` ADD  `donation_amount` DECIMAL( 10, 2 ) NOT NULL;
    ALTER TABLE  `golosales_flat_invoice` ADD  `base_donation_amount` DECIMAL( 10, 2 ) NOT NULL;
    ALTER TABLE  `golosales_flat_creditmemo` ADD  `donation_amount` DECIMAL( 10, 2 ) NOT NULL;
    ALTER TABLE  `golosales_flat_creditmemo` ADD  `base_donation_amount` DECIMAL( 10, 2 ) NOT NULL;

                        )

                )

            [9] => Array
                (
                    [file] => /home/golbon/domains/golbon.ir/public_html/app/code/core/Mage/Core/Model/Resource/Setup.php
                    [line] => 933
                    [function] => multiQuery
                    [class] => Varien_Db_Adapter_Pdo_Mysql
                    [type] => ->
                    [args] => Array
                        (
                            [0] => 
    ALTER TABLE  `golosales_flat_order` ADD  `donation_amount` DECIMAL( 10, 2 ) NOT NULL;
    ALTER TABLE  `golosales_flat_order` ADD  `base_donation_amount` DECIMAL( 10, 2 ) NOT NULL;
    ALTER TABLE  `golosales_flat_order` ADD  `donation_amount_invoiced` DECIMAL( 10, 2 ) NOT NULL;
    ALTER TABLE  `golosales_flat_order` ADD  `base_donation_amount_invoiced` DECIMAL( 10, 2 ) NOT NULL;
    ALTER TABLE  `golosales_flat_order` ADD  `donation_amount_refunded` DECIMAL( 10, 2 ) NOT NULL;
    ALTER TABLE  `golosales_flat_order` ADD  `base_donation_amount_refunded` DECIMAL( 10, 2 ) NOT NULL;
    ALTER TABLE  `golosales_flat_quote_address` ADD  `donation_amount` DECIMAL( 10, 2 ) NOT NULL;
    ALTER TABLE  `golosales_flat_quote_address` ADD  `base_donation_amount` DECIMAL( 10, 2 ) NOT NULL;
    ALTER TABLE  `golosales_flat_invoice` ADD  `donation_amount` DECIMAL( 10, 2 ) NOT NULL;
    ALTER TABLE  `golosales_flat_invoice` ADD  `base_donation_amount` DECIMAL( 10, 2 ) NOT NULL;
    ALTER TABLE  `golosales_flat_creditmemo` ADD  `donation_amount` DECIMAL( 10, 2 ) NOT NULL;
    ALTER TABLE  `golosales_flat_creditmemo` ADD  `base_donation_amount` DECIMAL( 10, 2 ) NOT NULL;

                        )

                )

            [10] => Array
                (
                    [file] => /home/golbon/domains/golbon.ir/public_html/app/code/local/GoodLabs/CharityCheckout/sql/charitycheckout_setup/mysql4-install-0.1.0.php
                    [line] => 24
                    [function] => run
                    [class] => Mage_Core_Model_Resource_Setup
                    [type] => ->
                    [args] => Array
                        (
                            [0] => 
    ALTER TABLE  `golosales_flat_order` ADD  `donation_amount` DECIMAL( 10, 2 ) NOT NULL;
    ALTER TABLE  `golosales_flat_order` ADD  `base_donation_amount` DECIMAL( 10, 2 ) NOT NULL;
    ALTER TABLE  `golosales_flat_order` ADD  `donation_amount_invoiced` DECIMAL( 10, 2 ) NOT NULL;
    ALTER TABLE  `golosales_flat_order` ADD  `base_donation_amount_invoiced` DECIMAL( 10, 2 ) NOT NULL;
    ALTER TABLE  `golosales_flat_order` ADD  `donation_amount_refunded` DECIMAL( 10, 2 ) NOT NULL;
    ALTER TABLE  `golosales_flat_order` ADD  `base_donation_amount_refunded` DECIMAL( 10, 2 ) NOT NULL;
    ALTER TABLE  `golosales_flat_quote_address` ADD  `donation_amount` DECIMAL( 10, 2 ) NOT NULL;
    ALTER TABLE  `golosales_flat_quote_address` ADD  `base_donation_amount` DECIMAL( 10, 2 ) NOT NULL;
    ALTER TABLE  `golosales_flat_invoice` ADD  `donation_amount` DECIMAL( 10, 2 ) NOT NULL;
    ALTER TABLE  `golosales_flat_invoice` ADD  `base_donation_amount` DECIMAL( 10, 2 ) NOT NULL;
    ALTER TABLE  `golosales_flat_creditmemo` ADD  `donation_amount` DECIMAL( 10, 2 ) NOT NULL;
    ALTER TABLE  `golosales_flat_creditmemo` ADD  `base_donation_amount` DECIMAL( 10, 2 ) NOT NULL;

                        )

                )

            [11] => Array
                (
                    [file] => /home/golbon/domains/golbon.ir/public_html/app/code/core/Mage/Core/Model/Resource/Setup.php
                    [line] => 624
                    [args] => Array
                        (
                            [0] => /home/golbon/domains/golbon.ir/public_html/app/code/local/GoodLabs/CharityCheckout/sql/charitycheckout_setup/mysql4-install-0.1.0.php
                        )

                    [function] => include
                )

            [12] => Array
                (
                    [file] => /home/golbon/domains/golbon.ir/public_html/app/code/core/Mage/Core/Model/Resource/Setup.php
                    [line] => 421
                    [function] => _modifyResourceDb
                    [class] => Mage_Core_Model_Resource_Setup
                    [type] => ->
                    [args] => Array
                        (
                            [0] => install
                            [1] => 
                            [2] => 0.1.3
                        )

                )

            [13] => Array
                (
                    [file] => /home/golbon/domains/golbon.ir/public_html/app/code/core/Mage/Core/Model/Resource/Setup.php
                    [line] => 327
                    [function] => _installResourceDb
                    [class] => Mage_Core_Model_Resource_Setup
                    [type] => ->
                    [args] => Array
                        (
                            [0] => 0.1.3
                        )

                )

            [14] => Array
                (
                    [file] => /home/golbon/domains/golbon.ir/public_html/app/code/core/Mage/Core/Model/Resource/Setup.php
                    [line] => 235
                    [function] => applyUpdates
                    [class] => Mage_Core_Model_Resource_Setup
                    [type] => ->
                    [args] => Array
                        (
                        )

                )

            [15] => Array
                (
                    [file] => /home/golbon/domains/golbon.ir/public_html/app/code/core/Mage/Core/Model/App.php
                    [line] => 417
                    [function] => applyAllUpdates
                    [class] => Mage_Core_Model_Resource_Setup
                    [type] => ::
                    [args] => Array
                        (
                        )

                )

            [16] => Array
                (
                    [file] => /home/golbon/domains/golbon.ir/public_html/app/code/core/Mage/Core/Model/App.php
                    [line] => 343
                    [function] => _initModules
                    [class] => Mage_Core_Model_App
                    [type] => ->
                    [args] => Array
                        (
                        )

                )

            [17] => Array
                (
                    [file] => /home/golbon/domains/golbon.ir/public_html/app/Mage.php
                    [line] => 683
                    [function] => run
                    [class] => Mage_Core_Model_App
                    [type] => ->
                    [args] => Array
                        (
                            [0] => Array
                                (
                                    [scope_code] => 
                                    [scope_type] => store
                                    [options] => Array
                                        (
                                        )

                                )

                        )

                )

            [18] => Array
                (
                    [file] => /home/golbon/domains/golbon.ir/public_html/index.php
                    [line] => 87
                    [function] => run
                    [class] => Mage
                    [type] => ::
                    [args] => Array
                        (
                            [0] => 
                            [1] => store
                        )

                )

        )

    [previous:Exception:private] => 
    [errorInfo] => Array
        (
            [0] => 42S21
            [1] => 1060
            [2] => Duplicate column name 'donation_amount'
        )

)

I removed all the extensions files but error report does not gone away.

What should i do to fix this issue?

  • Well, as error says Duplicate column name 'donation_amount'. Clean up your DB and try again. – Foo Bar May 21 '14 at 14:36
  • There isn't any duplicate field in DB. I added additional details to my question. – Sepano May 21 '14 at 15:06
1

Tim is right. Your query is:

ALTER TABLE  `golosales_flat_order` ADD  `donation_amount` DECIMAL( 10, 2 ) NOT NULL

and your error is:

SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'donation_amount'

This is quite obvious. Remove the column or avoid to run this install script.

  • I want to avoid this install script. So i removed all the extension's files and recovered my last full backup. But error report is still there. – Sepano May 21 '14 at 15:21
  • but now the error is something else I would assume? Did you clean the cache? – Fabian Blechschmidt May 21 '14 at 15:22
  • Yes. I cleaned the cache. can you see golbon.ir without any issue? what about golbon.ir/admin? – Sepano May 21 '14 at 15:29
  • so it is a kind of cache issue. thank you very much Fabian. – Sepano May 21 '14 at 15:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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