Setup:
core 7.10
commerce 1.1
----------------------
While trying to enable installed module the installation process fails with error:

PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'commerce.commerce_autosku_patterns' doesn't exist: SELECT product_type, pattern, advanced FROM {commerce_autosku_patterns} WHERE product_type IN (:types_0); Array ( [:types_0] => product ) in commerce_autosku_commerce_product_type_info_alter() (line 104 of D:\Tools\xampp\htdocs\kbb\sites\all\modules\commerce_autosku\commerce_autosku.commerce.inc).

After debuging the problem a bit for me it seems that the hook commerce_autosku_commerce_product_type_info_alter from commerce_autosku.commerce.inc is getting called before the db schema is being updated, hereby it fails on updating a table not yet created. The installation fails completely so that the needed table is not even created. After this of course the module is not working at all.
(I am not a PHP developer, so I tried some strange things to come to this conclusion like: renaming the _alter hook so to avoid it being called, and in this way the database table was created but the module was crashing during the product type update, saying that it cannot update empty value:

Strict warning: Creating default object from empty value in commerce_autosku_commerce_product_type_update() (line 14 of D:\Tools\xampp\htdocs\kbb\sites\all\modules\commerce_autosku\commerce_autosku.commerce.inc).

)
I am wondering how can this be? and especially that nobody had similar problems until now...hm.
Am I doing something wrong here? Help would be appreciated.

Comments

joseph11’s picture

I have same problem. Maybe some combination of Drupal, and/or commerce is causing this?

My versions:
Drupal 7.10
Commerce 1.1

decibel.places’s picture

oh hai

try using the -dev version

also might have to delete existing rows from table

rbayliss’s picture

Hmm.. this is a strange one. That hook really shouldn't be called before the module is installed. Were you able to get this fixed?

leteint’s picture

Il y a à la racine du site web un petit fichier nommé .gitignore qui fait que le répertoire /sites n'est pas effacé. Or dedans il y a les données de connexions et de param du drupal. CAD que si tu efface tout ou que tu écrase tout : ce fichier lui ne l'est pas ;-)

rbayliss’s picture

Status: Active » Closed (cannot reproduce)