News:

Looking for documentation? Take a look on our wiki

Main Menu

error 1075 while saving payment and shipment method

Started by michal123, February 12, 2015, 13:25:17 PM

Previous topic - Next topic

michal123

Hello, i have problem with vm. When i'll try to save payment and shipment method there's an error.

Shipment method:

1075 Incorrect table definition; there can be only one auto column and it must be defined as a key SQL=CREATE TABLE IF NOT EXISTS `abc_virtuemart_shipment_plg_weight_countries` ( `id` int(1) UNSIGNED NOT NULL AUTO_INCREMENT, `virtuemart_order_id` int(11) UNSIGNED, `order_number` char(32), `virtuemart_shipmentmethod_id` mediumint(1) UNSIGNED, `shipment_name` varchar(5000), `order_weight` decimal(10,4), `shipment_weight_unit` char(3) DEFAULT 'KG', `shipment_cost` decimal(10,2), `shipment_package_fee` decimal(10,2), `tax_id` smallint(1), `created_on` datetime NOT NULL default '0000-00-00 00:00:00', `created_by` int(11) NOT NULL DEFAULT '0', `modified_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `modified_by` int(11) NOT NULL DEFAULT '0', `locked_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `locked_by` int(11) NOT NULL DEFAULT '0') ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

Payment method:

1075 Incorrect table definition; there can be only one auto column and it must be defined as a key SQL=CREATE TABLE IF NOT EXISTS `abc_virtuemart_payment_plg_standard` ( `id` int(1) UNSIGNED NOT NULL AUTO_INCREMENT, `virtuemart_order_id` int(1) UNSIGNED, `order_number` char(64), `virtuemart_paymentmethod_id` mediumint(1) UNSIGNED, `payment_name` varchar(5000), `payment_order_total` decimal(15,5) NOT NULL DEFAULT '0.00000', `payment_currency` char(3), `email_currency` char(3), `cost_per_transaction` decimal(10,2), `cost_percent_total` decimal(10,2), `tax_id` smallint(1), `created_on` datetime NOT NULL default '0000-00-00 00:00:00', `created_by` int(11) NOT NULL DEFAULT '0', `modified_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `modified_by` int(11) NOT NULL DEFAULT '0', `locked_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `locked_by` int(11) NOT NULL DEFAULT '0') ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

I have updated VM from 3.0.3 to 3.0.4 but nothing.
Joomla 3.3.6
Php 5.3.29

Please help

unaiestefania


jenkinhill

Have you tried the "Install or if necessary update tables" tool?
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

unai

Hello , I tested the tool "Install tables or if necessary update them" and I still get the same error.
joomla 3.3.6
virtuemart 3.0.4
php 4.2.13.1

GJC Web Design

#4
Very odd - in your paste above the   ---  PRIMARY  KEY (id)  ---  is missing causing the failure

but that query comes from administrator\components\com_virtuemart\plugins\vmplugin.php func createTableSQL

in both 3.0.4 & 3.0.6 the PRIMARY KEY (id)  is there (and of course always has been)

protected function createTableSQL ($tableComment,$tablesFields=0) {

$query = "CREATE TABLE IF NOT EXISTS `" . $this->_tablename . "` (";
if(!empty($tablesFields)){
foreach ($tablesFields as $fieldname => $fieldtype) {
$query .= '`' . $fieldname . '` ' . $fieldtype . " , ";
}
} else {
$SQLfields = $this->getTableSQLFields ();
$loggablefields = $this->getTableSQLLoggablefields ();
foreach ($SQLfields as $fieldname => $fieldtype) {
$query .= '`' . $fieldname . '` ' . $fieldtype . " , ";
}
foreach ($loggablefields as $fieldname => $fieldtype) {
$query .= '`' . $fieldname . '` ' . $fieldtype . ", ";
}
}

$query .= "       PRIMARY KEY (`id`)
    ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COMMENT='" . $tableComment . "' AUTO_INCREMENT=1 ;";
return $query;
}


GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

jjk

Quote from: unai on February 22, 2015, 22:25:02 PM
Hello , I tested the tool "Install tables or if necessary update them" and I still get the same error.
joomla 3.3.6
virtuemart 3.0.4
php 4.2.13.1
This type of error might be due to an incomplete installation. You may try to install VM 3.0.6 (com_virtuemart.3.0.6.zip, com_virtuemart.3.0.6_ext_aio.zip and com_tcpdf_1.0.0.zip).
Also note, that your php version is below the Joomla 3.x minimum requirement of php 5.3.10 + (although this probably is not related to your error)
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

GJC Web Design

or if your confident that everything is working as it should except this you can make the tables manually in your DB with the key added to get u up and running

just run

CREATE TABLE IF NOT EXISTS `abc_virtuemart_payment_plg_standard` ( `id` int(1) UNSIGNED NOT NULL AUTO_INCREMENT, `virtuemart_order_id` int(1) UNSIGNED, `order_number` char(64), `virtuemart_paymentmethod_id` mediumint(1) UNSIGNED, `payment_name` varchar(5000), `payment_order_total` decimal(15,5) NOT NULL DEFAULT '0.00000', `payment_currency` char(3), `email_currency` char(3), `cost_per_transaction` decimal(10,2), `cost_percent_total` decimal(10,2), `tax_id` smallint(1), `created_on` datetime NOT NULL default '0000-00-00 00:00:00', `created_by` int(11) NOT NULL DEFAULT '0', `modified_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `modified_by` int(11) NOT NULL DEFAULT '0', `locked_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `locked_by` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (id) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

with your table prefix obviously .. but you would need to do this for any new VM plugin you want to configure
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

unai

  Hi, I do not quite understand what would be the solution to my problem. I do not think the reason is a wrong installation of virtuemart, virtuemart I upgraded to the latest version several times. My website only has virtuemart not have any article or anything weird installed.
the solution would create the tables by hand? which would be the next steps? Can someone help me?
This problem is giving me a lot of headaches.
Thank You

keora

Any step by step solution to this? Could you solve it? If I reset the tables everything is fine. Can't understand why... there a few topics, but no real solution - or at least no solutions people like me can understand. :D

GJC Web Design

don't understand what your asking?

QuoteIf I reset the tables everything is fine.

so the problem is?
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation