I tried to upgrade from 5.x-3.3 to the latest 5.x-4.0-alpha3, alpha4 and alpha5 and in all cases I fail to succesfully run the update.php script.

First it gives me an error:

Fatal error: Call to undefined function ec_customer_get_id() in /home/stratos/dev/sites/oineas2/public_html/sites/all/modules/ecommerce/store/store.install on line 714

and then when I click on the "Update summary" (as Drupal suggests) I get:

    * user warning: Table 'ec_product_ptypes' already exists query: CREATE TABLE ec_product_ptypes ( ptype VARCHAR(32) NOT NULL , name VARCHAR(32) NOT NULL , description LONGTEXT NOT NULL , PRIMARY KEY (ptype) ) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */ in /home/stratos/dev/sites/oineas2/public_html/includes/database.mysql.inc on line 172.
    * user warning: Table 'ec_product_features' already exists query: CREATE TABLE ec_product_features ( ptype VARCHAR(32) NOT NULL, ftype VARCHAR(32) NOT NULL, weight INT(10) NOT NULL, PRIMARY KEY (ptype,ftype) ) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */ in /home/stratos/dev/sites/oineas2/public_html/includes/database.mysql.inc on line 172.

    * The content fields table content_type_product has been deleted.
    * The content fields table content_type_product has been created.

The update process was aborted prematurely while running update #5402 in store.module. All other errors have been logged. You may need to check the watchdog database table manually.

    * Main page
    * Administration pages

The following queries were executed
ec_anon module
Update #4001

    * No queries

product module
Update #5401

    * Failed: CREATE TABLE {ec_product_ptypes} ( ptype VARCHAR(32) NOT NULL , name VARCHAR(32) NOT NULL , description LONGTEXT NOT NULL , PRIMARY KEY (ptype) ) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */

Update #5402

    * No queries

Update #5403

    * No queries

Update #5405

    * No queries

store module
Update #5401

    * ALTER TABLE {ec_transaction} ADD ecid INT(10) UNSIGNED NOT NULL AFTER uid
    * ALTER TABLE {ec_transaction} ADD INDEX (ecid)

Update #5402

    * No queries

I am running the latest Drupal 5.2

Is there something I need to disable (or enable...?) There are no specific upgrade instructions....

--Stratos

Comments

gordon’s picture

Status: Active » Fixed

I think that this was an issue where multiple updates are being updated in a single request. I have added a drupal_load() to load in the ec_customer module

stratosgear’s picture

Hey,

Thanks for the quick reply...

So, is there something I check out in order to try this...? Can I patch something to include this drupal_load()...? Where should I put it...?

Or do I simply wait for the next alpha?

Thanks.

gordon’s picture

Yes you can use the patch that is attached to the following commit.

http://git.drupalecommerce.org/?p=ecommerce.git;a=commit;h=8a337f9162079...

stratosgear’s picture

Status: Fixed » Active

Sorry gordon,

I applied the patch but still no go. I get the same behavior as described in the first message...

I ignored all the errors and continued, but since the 5402 update fails and aborts, all the ec transaction updates that are performed in 5402 are NOT running.

Let alone that the update.php script always chokes on the store 5402 update point....

(Onto another subject... Should I open another issue that all the format_currency() function calls had to be changed to payment_format()...?)

Thanks,

Stratos,

gordon’s picture

Status: Active » Postponed (maintainer needs more info)

Can you please check your logs and see what PHP errors exist from the upgrade.

Also format_currency() is valid and is now in the ec_common module. payment_format() no longer exists. In fact the payment_module no longer exists.

gordon’s picture

Status: Postponed (maintainer needs more info) » Fixed

I have made changes to the install/update processes so that before enabling new modules the system table is rebuilt.

Anonymous’s picture

Status: Fixed » Closed (fixed)