ec_shipping_product_attribute' doesn't exist
| Project: | e-Commerce |
| Version: | 5.x-3.0 |
| Component: | shipping |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | duplicate |
Jump to:
getting the following errors all seem to be around a shipping table not existing. also downloaded the latest 5.x.3 dev version and then ran update php. Still errors see:
user warning: Table 'starttmp.ec_shipping_product' doesn't exist query: SELECT service, method FROM ec_shipping_product WHERE vid = 22 in C:\apache2triad\htdocs\starttmp\includes\database.mysql.inc on line 172.
user warning: Table 'starttmp.ec_shipping_product_attribute' doesn't exist query: SELECT field, value FROM ec_shipping_product_attribute WHERE vid = 22 in C:\apache2triad\htdocs\starttmp\includes\database.mysql.inc on line 172.
user warning: Table 'starttmp.ec_shipping_product' doesn't exist query: SELECT service, method FROM ec_shipping_product WHERE vid = 21 in C:\apache2triad\htdocs\starttmp\includes\database.mysql.inc on line 172.
user warning: Table 'starttmp.ec_shipping_product_attribute' doesn't exist query: SELECT field, value FROM ec_shipping_product_attribute WHERE vid = 21 in C:\apache2triad\htdocs\starttmp\includes\database.mysql.inc on line 172.
user warning: Table 'starttmp.ec_shipping_product' doesn't exist query: SELECT service, method FROM ec_shipping_product WHERE vid = 20 in C:\apache2triad\htdocs\starttmp\includes\database.mysql.inc on line 172.
user warning: Table 'starttmp.ec_shipping_product_attribute' doesn't exist query: SELECT field, value FROM ec_shipping_product_attribute WHERE vid = 20 in C:\apache2triad\htdocs\starttmp\includes\database.mysql.inc on line 172.
user warning: Table 'starttmp.ec_shipping_product' doesn't exist query: SELECT service, method FROM ec_shipping_product WHERE vid = 19 in C:\apache2triad\htdocs\starttmp\includes\database.mysql.inc on line 172.
user warning: Table 'starttmp.ec_shipping_product_attribute' doesn't exist query: SELECT field, value FROM ec_shipping_product_attribute WHERE vid = 19 in C:\apache2triad\htdocs\starttmp\includes\database.mysql.inc on line 172.

#1
Also having the same problem.
I did have some trouble activated the eCommerce modules initially - it took three or four loops around before all the dependencies seemed to rattle into place.
Anyway, I resolved this by opening up the .install file and manually creating the tables using the MySQL commands within.
#2
I've had this same problem and had to manually add all 4 shipping tables via the .install file as well.
#3
the same trouble:
* user warning: Table 'drupalbase.ec_shipping_product' doesn't exist query: SELECT service, method FROM ec_shipping_product WHERE vid = 1 in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\includes\database.mysqli.inc on line 151.
* user warning: Table 'drupalbase.ec_shipping_product_attribute' doesn't exist query: SELECT field, value FROM ec_shipping_product_attribute WHERE vid = 1 in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\includes\database.mysqli.inc on line 151.
Does it mean shipping.install was not executed? Of course, there is possibility to create tables manually, but how it should work by design?
How shipping.install should be executed? Where is error?
#4
I am having the same issue - on my 5.1 install -
I have added the following tables:
CREATE TABLE `ec_shipping_product` (
vid int(10) unsigned NOT NULL default '0',
nid int(10) unsigned NOT NULL default '0',
service varchar(40) NOT NULL default '0',
method varchar(40) NOT NULL default '0',
KEY (vid),
KEY nid (nid),
KEY (service),
KEY (method)
) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8;
CREATE TABLE `ec_shipping_transaction` (
txnid int(10) unsigned NOT NULL DEFAULT '0',
service varchar(255) NOT NULL DEFAULT '',
method varchar(255) NOT NULL DEFAULT '',
cost decimal(10,2) UNSIGNED NOT NULL DEFAULT '0.00',
PRIMARY KEY (txnid)
) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8;
CREATE TABLE `ec_shipping_product_attribute` (
pid int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
vid int(10) UNSIGNED NOT NULL DEFAULT '0',
nid int(10) UNSIGNED NOT NULL DEFAULT '0',
field varchar(255) NOT NULL DEFAULT '',
value varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY pid (pid),
KEY field (field),
KEY vid (vid),
KEY nid (nid)
) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8;
CREATE TABLE `ec_shipping_shipfrom` (
sid int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
title varchar(255) NOT NULL DEFAULT '',
code varchar(255) NOT NULL DEFAULT '',
city varchar(255) NOT NULL DEFAULT '',
region varchar(255) NOT NULL DEFAULT '',
country varchar(2) NOT NULL DEFAULT '',
status int(3) NOT NULL DEFAULT 0,
PRIMARY KEY sid (sid),
KEY title (title)
) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8;
For some reason I cannot get the last of the tables installed - I have sql syntax error somewhere:
CREATE TABLE `ec_shipping_product` (
vid int NOT NULL default '0',
nid int NOT NULL default '0',
service varchar(40) NOT NULL default '0',
method varchar(40) NOT NULL default '0'
)
CREATE INDEX ec_shipping_product_vid_idx ON ec_shipping_product vid,
CREATE INDEX ec_shipping_product_nid_idx ON ec_shipping_product nid,
CREATE INDEX ec_shipping_product_service_idx ON ec_shipping_product service,
CREATE INDEX ec_shipping_product_method ON ec_shipping_product method,
CREATE TABLE `ec_shipping_transaction` (
txnid int NOT NULL DEFAULT '0' CHECK (txnid >= 0),
service varchar(255) NOT NULL DEFAULT '',
method varchar(255) NOT NULL DEFAULT '',
cost decimal(10,2) NOT NULL DEFAULT '0.00' CHECK (cost >= 0),
PRIMARY KEY (txnid)
)
The one above is the one I am working on - these below I have not cleaned up yet... I keep geting an error on line 7...
db_query("CREATE TABLE {ec_shipping_shipfrom} (
sid serial CHECK (sid >= 0),
title varchar(255) NOT NULL DEFAULT '',
code varchar(255) NOT NULL DEFAULT '',
city varchar(255) NOT NULL DEFAULT '',
region varchar(255) NOT NULL DEFAULT '',
country varchar(2) NOT NULL DEFAULT '',
status int NOT NULL DEFAULT 0,
PRIMARY KEY (sid)
)");
db_query("CREATE INDEX {ec_shipping_shipfrom}_title_idx ON {ec_shipping_shipfrom} (title)");
break;
Does anyone have a clean version of all the EC shipping tables ?
J -
#5
Here the right sql. for your last sql it need to have ` instead of '
CREATE TABLE `ec_shipping_product` (
vid int NOT NULL default '0',
nid int NOT NULL default '0',
service varchar(40) NOT NULL default '0',
method varchar(40) NOT NULL default '0'
)
CREATE INDEX ec_shipping_product_vid_idx ON ec_shipping_product vid,
CREATE INDEX ec_shipping_product_nid_idx ON ec_shipping_product nid,
CREATE INDEX ec_shipping_product_service_idx ON ec_shipping_product service,
CREATE INDEX ec_shipping_product_method ON ec_shipping_product method,
CREATE TABLE `ec_shipping_transaction` (
txnid int NOT NULL DEFAULT '0' CHECK (txnid >= 0),
service varchar(255) NOT NULL DEFAULT '',
method varchar(255) NOT NULL DEFAULT '',
cost decimal(10,2) NOT NULL DEFAULT '0.00' CHECK (cost >= 0),
PRIMARY KEY (txnid)
)
CREATE TABLE `ec_shipping_shipfrom` (
sid serial CHECK (sid >= 0),
title varchar(255) NOT NULL DEFAULT '',
code varchar(255) NOT NULL DEFAULT '',
city varchar(255) NOT NULL DEFAULT '',
region varchar(255) NOT NULL DEFAULT '',
country varchar(2) NOT NULL DEFAULT '',
status int NOT NULL DEFAULT 0,
PRIMARY KEY (sid)
)
CREATE INDEX `ec_shipping_shipfrom_title_idx` ON `ec_shipping_shipfrom` (title)
#6
grrr.... previous one not correct. below is the correct sql. verify by running it directly in mysql. :)
CREATE TABLE `ec_shipping_product` (
vid int NOT NULL default '0',
nid int NOT NULL default '0',
service varchar(40) NOT NULL default '0',
method varchar(40) NOT NULL default '0'
);
CREATE INDEX `ec_shipping_product_vid_idx` ON `ec_shipping_product` (vid);
CREATE INDEX `ec_shipping_product_nid_idx` ON `ec_shipping_product` (nid);
CREATE INDEX `ec_shipping_product_service_idx` ON `ec_shipping_product` (service);
CREATE INDEX `ec_shipping_product_method` ON `ec_shipping_product` (method);
CREATE TABLE `ec_shipping_transaction` (
txnid int NOT NULL DEFAULT '0' CHECK (txnid >= 0),
service varchar(255) NOT NULL DEFAULT '',
method varchar(255) NOT NULL DEFAULT '',
cost decimal(10,2) NOT NULL DEFAULT '0.00' CHECK (cost >= 0),
PRIMARY KEY (txnid)
);
CREATE TABLE `ec_shipping_shipfrom` (
sid serial CHECK (sid >= 0),
title varchar(255) NOT NULL DEFAULT '',
code varchar(255) NOT NULL DEFAULT '',
city varchar(255) NOT NULL DEFAULT '',
region varchar(255) NOT NULL DEFAULT '',
country varchar(2) NOT NULL DEFAULT '',
status int NOT NULL DEFAULT 0,
PRIMARY KEY (sid)
);
CREATE INDEX `ec_shipping_shipfrom_title_idx` ON `ec_shipping_shipfrom` (title);
#7
I did the above but it was missing shipping_product_attribute. I copied the sql from another previous post and put it into phpmyadmin - didn't come up with any errors but didn't create the table. So, I did it through the command line and it created the table, and everything seems to work ok at the moment...
CREATE TABLE `ec_shipping_product_attribute` (
pid int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
vid int(10) UNSIGNED NOT NULL DEFAULT '0',
nid int(10) UNSIGNED NOT NULL DEFAULT '0',
field varchar(255) NOT NULL DEFAULT '',
value varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY pid (pid),
KEY field (field),
KEY vid (vid),
KEY nid (nid)
) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8;
#8
having the same problem with ec_shipping_product_attribute. But i don't know how to do it through the command line. Can anyone help! i'm using cpanel
#9
This works in phpMyAdmin:
CREATE TABLE ec_shipping_product_attribute (pid int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
vid int(10) UNSIGNED NOT NULL DEFAULT '0',
nid int(10) UNSIGNED NOT NULL DEFAULT '0',
field varchar(255) NOT NULL DEFAULT '',
value varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY pid (pid),
KEY field (field),
KEY vid (vid),
KEY nid (nid)
) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */;
#10
see http://drupal.org/node/125980 for further updates