VM 2.6 BUG. Not translated products visible in the front end

Started by MarioP, April 24, 2014, 11:18:09 AM

Previous topic - Next topic

MarioP

Hi,
I have a multilanguage site where the categories are the same. But the products aren't the same for both language versions. So I have products both in Polish and English. But I also need to have some products available only in Polish.
After update VM from 2.0.26d there's something wrong with the multilanguage VM. I've noticed that not translated products - products with no filled English form in the VM backend (to be sure I've checked the virtuemart_products_en_gb database and there's no records for those products) show up in the category view of that language version. There's an image thumbnail and the 'Product details' text... After click on it we have "404 The requested product does not exist" notification. Did I miss something? Could anyone confirm or deny existence of that issue?

I did category override with default.php file from VM 2.0.26 where everything was fine in that matter but it didn't help...So the problem probably lies somewhere else...

Tested on XAMPP 1.8.2  [PHP: 5.4.25]

VM. 2.6.0
J! 2.5.19

Maybe that is not common that I want to have some products only in one language, so it's not possible to do that in the new VM 2.6? I know for sure that there was no problem in that matter in the previous (2.0.26d stable) version.

Milbo

ehrm, yes.

The reason is that I added a fallback for vm3. I ported it back partly, because the sql got optimised and I did not want to maintain two different versions. Actually I think the vmtables.php of vm3 should also run in vm2. Please test the attached file

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

MarioP

Doesn't work. English website version completely stopped to work with that file - blank page.

Below error logs

Strict Standards: Declaration of JParameter::loadSetupFile() should be compatible with JRegistry::loadSetupFile() in C:\xampp\htdocs\joomla\libraries\joomla\html\parameter.php on line 512

Strict Standards: Declaration of JCacheControllerPage::store() should be compatible with JCacheController::store($data, $id, $group = NULL) in C:\xampp\htdocs\joomla\libraries\joomla\cache\controller\page.php on line 199

Strict Standards: Only variables should be assigned by reference in C:\xampp\htdocs\joomla\plugins\system\jtouchmobile\jtouchmobile.php on line 48

Strict Standards: Only variables should be assigned by reference in C:\xampp\htdocs\joomla\plugins\system\jtouchmobile\jtouchmobile.php on line 106

Strict Standards: Only variables should be assigned by reference in C:\xampp\htdocs\joomla\plugins\system\jtouchmobile\jtouchmobile.php on line 212

Milbo

you have this strict standards notices always, has nothing todo with the vmtable. What happens if you diff it, the new vmtable has a fallback and would show your products in the default language.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

MarioP

So...what next? Any chance to solve that problem in the new 2.6 series release?

Milbo

I just tested the vmtables of vm3 in vm2 and it works. Please enable vmdebug. So it works if the language is there, but shows white screen if it is missing?
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

MarioP

Ok, it looks following:
With original vmtable.php (VM 2.6) we have (debug info):
vmdebug My selected language by JFactory::getLanguage()->getTag() en-GB
vmdebug $siteLang: en-GB self::$_jpConfig->lang en_gb
vmdebug vmTime: loadConfig db no: 0
vmdebug Start used Ram 7.25M
vmdebug Common jQuery is disabled
vmdebug Common jQuery is disabled
vmdebug $valid_search_fields Var1:
Array
(
    [0] => product_name
    [1] => product_s_desc
    [2] => category_name
    [3] => category_description
    [4] => mf_name
)

vmdebug setPaginationLimits is site and $cateid,$manid Var1:
7
Var2:
15
Var3:
0
vmdebug getShopperData customer_number 0
vmdebug End used Ram 12.25M
vmdebug Peak memory peak 12.25M


After replacing to the new vmtable file we have a blank page and error:
Fatal error: Access to undeclared static property: VmConfig::$langCount C:\xampp\htdocs\joomla\administrator\components\com_virtuemart\helpers\vmtable.php on line 585

MarioP

Quote from: Milbo on April 25, 2014, 12:55:13 PM
I just tested the vmtables of vm3 in vm2 and it works. Please enable vmdebug. So it works if the language is there, but shows white screen if it is missing?
Indeed it works. I don't know what was wrong yesterday that my whole English version broke down after replacing the vmtable.php. So generally it works but I have this fatal error on the pages (VM category layout) where I have NOT TRANSLATED products - products in only Polish language
Fatal error: Access to undeclared static property: VmConfig::$langCount C:\xampp\htdocs\joomla\administrator\components\com_virtuemart\helpers\vmtable.php on line 585

Milbo

yepp, I had to change a bit also the config. But it does not completly work. Actually it is just a switch in one in the product model to get back the old behaviour. I sent you my skype contact
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/