News:

Looking for documentation? Take a look on our wiki

Main Menu

Database error on shipment method

Started by keora, November 21, 2016, 11:01:30 AM

Previous topic - Next topic

keora

Hi Everybody!

I got a problem with the shipment methods. Can't edit or create a new one anymore for whatever reason (see attachement).

It exists with and without using a template.

Any idea how to solve it? I am unfortunately very bad at databases.

Thanks a lot!
Stefan

Milbo

Just use the table updater again. In the tools
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

keora

Heyho Milbo!

Thanks for the fast reply.

I hope I used the right selection as I got the German Joomla version.

In German it says "Tools - Updating/Migration - Install tables if necessary or update them" - correct?

If I use that one, I got an error message saying:

Es ist ein Fehler aufgetreten!
1075 Incorrect table definition; there can be only one auto column and it must be defined as a key SQL=ALTER TABLE `#__virtuemart_ratings` DROP INDEX `virtuemart_product_id`


Milbo

Seltsamer Fehler. Which version did update and which version do you have now?
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

keora

I had 3.6.1 and now 3.6.4 - but doesn't work on either version.

I migrated the page two weeks ago - and everything seemed to work - well everything but the shipment apparently. Can't select any shipment methods anymore either but the only one with any costs (pickup).

Milbo

The table should look like this

CREATE TABLE IF NOT EXISTS `#__virtuemart_ratings` (
  `virtuemart_rating_id` INT(1) UNSIGNED NOT NULL AUTO_INCREMENT,
  `virtuemart_product_id` int(1) UNSIGNED NOT NULL DEFAULT '0',
  `rates` int(1) NOT NULL DEFAULT '0',
  `ratingcount` int(1) UNSIGNED NOT NULL DEFAULT '0',
  `rating` decimal(10,1) NOT NULL DEFAULT '0.0',
  `published` tinyint(1) NOT NULL DEFAULT '1',
  `created_on` datetime NOT NULL default '0000-00-00 00:00:00',
  `created_by` int(1) NOT NULL DEFAULT '0',
  `modified_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `modified_by` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`virtuemart_rating_id`),
  UNIQUE KEY `virtuemart_product_id` (`virtuemart_product_id`,`virtuemart_rating_id`),
  KEY `published` (`published`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 COMMENT='Stores all ratings for a product';


Please post the definition of your table. I wonder that the updater tries to delete your primary key (deletion of keys is not unusual, but not for primary keys).
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

keora

Hi Milbo!

Thanks a lot for the effort. Gotta hook up with a friend who knows where to put this information and where to get the information you need. I am really a database noob unfortunately and have no idea how to access that table.

Kind regards,
Stefan

keora

Or is there any easy step by step solution how to do this?

Milbo

Quote from: keora on November 21, 2016, 20:33:13 PM
I had 3.6.1 and now 3.6.4 - but doesn't work on either version.

I meant the VirtueMart Versions. Btw, when you updated too late, you may got hacked already.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Milbo

Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

keora

Hey Milbo
Thanks again a lot. Didn't work out though - I installed adminer, but i can't make it work. I activated the adminer, but when i try to connect to the database I only receive a blank space.
JooDatabase can't connect to an existing database and DB Tweaks won't even show up despite being installed and activated.

I tried resetting the DB and VM worked fine again. But then again it makes me lose all products and categories etc.

Is there a possibilty that I reset the DB and then reinstall a backup - or will it just be messed up again?

keora

Edit: Ignore my previous post - got Joomla MySQL Manager running. Though I am lost again XD

What table should I edit how? :D

keora

Table structure looks like that:
_virtuemart_shipmentmethods

virtuemart_shipmentmethod_id   int(1) unsigned   NO   PRI      auto_increment
virtuemart_vendor_id   smallint(1)   NO      1   
shipment_jplugin_id   int(1)   NO   MUL   0   
slug   char(255)   NO         
shipment_element   char(50)   NO   MUL      
shipment_params   varchar(19000)   NO         
ordering   int(1)   NO   MUL   0   
shared   tinyint(1)   NO      0   
published   tinyint(1)   NO      1   
created_on   datetime   NO      0000-00-00 00:00:00   
created_by   int(1)   NO      0   
modified_on   datetime   NO      0000-00-00 00:00:00   
modified_by   int(1)   NO      0   
locked_on   datetime   NO      0000-00-00 00:00:00   
locked_by   int(1)   NO      0   

Milbo

We need the structure of the rating table, not shipment
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

keora


Field   Type   Null   Key   Default   Extra
virtuemart_rating_id   int(1) unsigned   NO   PRI      auto_increment
virtuemart_product_id   int(1) unsigned   NO   PRI   0   
rates   int(1)   NO      0   
ratingcount   int(1) unsigned   NO      0   
rating   decimal(10,1)   NO      0.0   
published   tinyint(1)   NO   MUL   1   
created_on   datetime   NO      0000-00-00 00:00:00   
created_by   int(1)   NO      0   
modified_on   datetime   NO      0000-00-00 00:00:00   
modified_by   int(1)   NO      0

Sorry :(