VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: accessvirus on August 08, 2016, 10:43:51 AM

Title: SOLVED : BUG: Duplicate article results in 1146 error
Post by: accessvirus on August 08, 2016, 10:43:51 AM
When I want to duplicate an existing virtuemart product item, I get an error:

1146 Table 'testsite.#__virtuemart_products_it_it' doesn't exist SQL=SELECT `#__virtuemart_products`.* ,`#__virtuemart_products_it_it`.* FROM `#__virtuemart_products` INNER JOIN `#__virtuemart_products_it_it` using (`virtuemart_product_id`) WHERE `#__virtuemart_products`.`virtuemart_product_id` = "1"

Joomla 3.6.2
VM 3.0.14
PHP   5.5.32

However, the product is duplicated, but I am not sure what will happen with this product.
Title: Re: BUG: Duplicate article results in 1146 error
Post by: GJC Web Design on August 08, 2016, 15:51:45 PM
if it is requiring #__virtuemart_products_it_it then u need to create it

try the vm admin tools  .. table updater or clone #__virtuemart_products_en_gb and rename
Title: Re: BUG: Duplicate article results in 1146 error
Post by: accessvirus on August 08, 2016, 18:59:48 PM
I'm not a programmer. When I am in the backend of Virtuemart, I can expect such things to work when I press the duplicate button. I can't imagine everyone willing to use the duplicate item button, needs to make a database table themselves
Title: Re: BUG: Duplicate article results in 1146 error
Post by: GJC Web Design on August 08, 2016, 21:58:43 PM
I use duplicate all the time.. it works...  it isn't a code error.. it is a config/update/install error on your site when u configured your languages or what ever (how can we know what u have done/not done?)

the error clearly states what is missing.. if u don't want to follow the advice to fix it that is offered that's fine with me...

did u bother to try this?  try the vm admin tools  .. table updater

Install or if necessary update tables
Title: Re: BUG: Duplicate article results in 1146 error
Post by: accessvirus on August 09, 2016, 13:16:45 PM
Of course I want to follow your advise. But let me first explain more.

I have 7 languages activated, NL, PT, ES, DE, NL, EN, FR. I cannot seem to see an error for other languages.

I see that there is one default table but there is nothing in it. Only
testsite.#__virtuemart_products

and that there is a language specific table for NL with products in it.
testsite.#__virtuemart_products_nl_nl

I also have this dual structure for:

_virtuemart_shipmentmethods
_virtuemart_shipmentmethods_nl_nl

b0nqt_virtuemart_categories
b0nqt_virtuemart_categories_nl_nl

b0nqt_virtuemart_manufacturercategories
b0nqt_virtuemart_manufacturercategories_nl_nl

b0nqt_virtuemart_shipmentmethods
b0nqt_virtuemart_shipmentmethods_nl_nl

So, does this mean that Virtuemart should have made an extra table in all of these for each language?

I am not sure why only the _it_it gives the error cause the rest is not there as well. Maybe because that would be the first in line and then because of the error it stops? (I checked the testsite.#__virtuemart_products_nl_nl table and it contains all the products.)
Title: Re: BUG: Duplicate article results in 1146 error
Post by: GJC Web Design on August 09, 2016, 13:29:45 PM
yes-- there must be a corresponding lang table for every lang on products, cats, ship, payments etc etc
have u properly installed the VM langs, the Joomla langs, set up Joomla correctly for multi lang and tried "Install or if necessary update tables" ?
Title: Re: BUG: Duplicate article results in 1146 error
Post by: accessvirus on August 09, 2016, 14:08:37 PM
The multi language settings in Joomla and virtuemart I already had setup. I did not install languege packs for VM. I did not know I had to manually install VM language packs as well, since I already added the languages in the VM shop configuration multi language area.

After I discovered this I went to this page https://virtuemart.net/community/translations/core-modules-plugins-language-packs (https://virtuemart.net/community/translations/core-modules-plugins-language-packs) and installed the german language pack first.

com_virtuemart - de-DE.zip
com_virtuemart - nl-NL.zip
com_virtuemart - es-ES.zip
com_virtuemart - it-IT.zip
com_virtuemart - fr-FR.zip
com_virtuemart - pt-PT.zip

After I installed the german language pack I checked the database again but still no multi language product tables.

Do I need to start with a clean install to get those tables being put there?
Title: Re: BUG: Duplicate article results in 1146 error
Post by: GJC Web Design on August 09, 2016, 17:10:29 PM
QuoteDo I need to start with a clean install to get those tables being put there?

I wouldn#t have thought so.. maybe they are created when u first try to translate or.. as I've mentioned..  "Install or if necessary update tables"

this tool is precisely for this sort of problem

Title: Re: BUG: Duplicate article results in 1146 error
Post by: Milbo on August 09, 2016, 22:30:11 PM
You just need to run the table updater or store the config, that recreates the tables. But if you want to use the config option, then you need vm3.0.17.4. It has nothing todo with the language packs.
The only thing which counts are the languages set in the vm config.
Title: Re: BUG: Duplicate article results in 1146 error
Post by: accessvirus on August 09, 2016, 23:53:49 PM
I just used the feature to update the tables and it worked. Thanks! I was not familiar with this tool.
Title: Re: SOLVED : BUG: Duplicate article results in 1146 error
Post by: GJC Web Design on August 10, 2016, 00:02:02 AM
 ::)  my first suggestion.....

Quotetry the vm admin tools  .. table updater
Title: Re: SOLVED : BUG: Duplicate article results in 1146 error
Post by: accessvirus on August 10, 2016, 00:10:52 AM
Yeah now I see, I later understood what that was. First time I work with Virtuemart so sorry for that ;) Thanks for your help, greatly appreciated!