I received the following error installing module:
Key column 'nid_id' doesn't exist in table query: CREATE TABLE cfh_uc_product_keys ( `pkid` INT unsigned NOT NULL auto_increment, `pksid` INT unsigned NOT NULL, `uid` INT unsigned NOT NULL DEFAULT 0, `order_id` INT unsigned NOT NULL DEFAULT 0, `nid` INT unsigned NOT NULL DEFAULT 0, `product_key` TEXT NOT NULL, `activations` INT unsigned NOT NULL DEFAULT 0, `status` INT unsigned NOT NULL DEFAULT 0, PRIMARY KEY (pkid), INDEX pksid_idx (pksid), INDEX uid_idx (uid), INDEX order_idx (order_id), INDEX nid_idx (nid_id) ) /*!40100 DEFAULT CHARACTER SET UTF8 */
I think the last index should be fixed but but I'm not totally sure (nid instead of nid_id).
This leads to the following warning when trying to add create a new Product:
warning: Invalid argument supplied for foreach() in /Applications/MAMP/htdocs/drupal-6.14/sites/all/modules/uc_product_keys/uc_product_keys.module on line 641.
I don't know why it's complaining.
Comments
Comment #1
freatida commentedI get a similar warning when enabling module:
user warning: Key column 'nid_id' doesn't exist in table query: CREATE TABLE uc_product_keys ( `pkid` INT unsigned NOT NULL auto_increment, `pksid` INT unsigned NOT NULL, `uid` INT unsigned NOT NULL DEFAULT 0, `order_id` INT unsigned NOT NULL DEFAULT 0, `nid` INT unsigned NOT NULL DEFAULT 0, `product_key` TEXT NOT NULL, `activations` INT unsigned NOT NULL DEFAULT 0, `status` INT unsigned NOT NULL DEFAULT 0, PRIMARY KEY (pkid), INDEX pksid_idx (pksid), INDEX uid_idx (uid), INDEX order_idx (order_id), INDEX nid_idx (nid_id) ) /*!40100 DEFAULT CHARACTER SET UTF8 */ in /home/mysite/public_html/includes/database.inc on line 529.
Comment #2
gwink commentedAny thoughts on this? It doesn't allow for import of keys yet either.
Comment #3
freixas commentedThis was fixed in v1,2 of uc_product_keys.install, which was checked in on 12/09/2009. If you get the latest dev release, the fix should be there—along with a ton of other fixes.
I've had one person verify that key import works.
Comment #4
freixas commented