News:

Looking for documentation? Take a look on our wiki

Main Menu

Error 1052 in virtuemart backend --> manufacturers

Started by heinz2, May 04, 2017, 18:39:23 PM

Previous topic - Next topic

heinz2

Hallo,
i'm using VirtueMart 3.2.1 / Joomla 3.7.0 / PHP 7.0.17.

In virtuemart-backend, when selecting "manufacturers" I receive an error 1052:
"1052 Column 'mf_name' in where clause is ambiguous "

I'm using a multilingual shop (English / German).

Does anybody have a suggestion, how to fix this?

Thanks in advance.

VirtueMart 3.6.6 / Joomla 3.9.12 / PHP 7.3.11

m.davide82

Go in "Migrations Tools" and click on install/update tables.

You will solve this problem.


Have a nice job!

heinz2

VirtueMart 3.6.6 / Joomla 3.9.12 / PHP 7.3.11

hegbi

Hello, I have the same error after upgrading from J2.5/VM2/PHP5.6 to J3.7.2/VM3.2.3/PHP 7.0.15
"1052 Column 'mf_name' in where clause is ambiguous" in BE. When I click on Manufacturers, they are shown, but if I search them it goes to error 1052 and I cannot view Manufacturers anymore.

Also, on FE categories are very slow, over 60 secs load time if over 600 products in a category.

I have tried install/update tables but no luck.
If I turn off SEO everything works just fine and really fast on FE, error is still there in BE.
Also, when I do not use Manufacturers (Configuration>Templates>Show Manufacturers>No) all is OK in FE even with SEO on, but error is still there in BE.

Any thoughts?

K&K media production

QuoteGo in "Migrations Tools" and click on install/update tables.

check if migration tools are enabled (first tab of vm config)

hegbi

thx, but "Enable database Update tools" is already checked

Gargulich

Quote from: hegbi on May 27, 2017, 12:14:34 PM
thx, but "Enable database Update tools" is already checked

I had the same problem. I cleaned the Joomla cache and went into the admin panel from another Windows. After which the error was lost. What was the problem I do not know.

hegbi

tried even to delete tables in phpmyadmin, but the problems are still there.

when I use administrator\components\com_virtuemart\models\manufacturer.php version 9413 (from VM3.0.19) BE is working again without error, but FE is still not OK (loading categories very slow)...

garikello

Same problem appeared today with my page...
I got it together with  Virtuemart link disapperance in back-end - both seperate link and link in component list are gone...

VirtueMart 3.2.1 / Joomla 3.7.2 / PHP 7.0.19.

K&K media production

#9
administrator/components/com_virtuemart/models/manufacturer.php

around line 158

change
$where[] .= ' LOWER( `mf_name` ) LIKE '.$search;

to
$useFb = vmLanguage::getUseLangFallback();
$useFb2 = vmLanguage::getUseLangFallbackSecondary();
if($useFb2){
$prefix = 'ljd';
} else if($useFb){
$prefix = 'ld';
} else {
$prefix = 'l';
}
$where[] .= ' LOWER( '.$prefix.'.`mf_name` ) LIKE '.$search;



garikello

Quote from: K&K media production on June 02, 2017, 00:45:53 AM
administrator/components/com_virtuemart/models/manufacturer.php

around line 158

change
$where[] .= ' LOWER( `mf_name` ) LIKE '.$search;

to
$where[] .= ' LOWER( ld.`mf_name` ) LIKE '.$search;



Can you explained what happened?
I didn' t do anything, that could change the code, but I have the error.

K&K media production


garikello

Well, it works. Thanks.

I am  a bit worried, what caused this error.

Also, why my links for Virtuemart component dissappeared in back-end together with this error... and how do I get them back.

K&K media production

QuoteI am  a bit worried, what caused this error.

missing prefix for db column mf_name

QuoteAlso, why my links for Virtuemart component dissappeared in back-end together with this error... and how do I get them back.

update to latest version vm 3.2.3 -> after that you must reedit my posted code