News:

Looking for documentation? Take a look on our wiki

Main Menu

[fixed]Error in version 1.9.8H #__template_styles

Started by Cleanshooter, October 10, 2011, 20:45:54 PM

Previous topic - Next topic

Cleanshooter

After updating today I came across an error that did not get resolved by renewing the config file.

Screenshot of problem:



I am running VM 1.9.8H and J! 1.7.0.

The problem resides here: administrator/components/com_virtuemart/models/config.php

Your code:

if(version_compare(JVERSION,'1.6.0','ge')) {
   $q = 'SELECT `template` FROM `#__templates_styles` WHERE `client_id` ="0" AND `home`="1" ';
}
else {
   $q = 'SELECT `template` FROM `#__templates_menu` WHERE `client_id` ="0" ';
}


Problem is... in my version of J! the tables name is #__template_styles not #__templates_styles.

I'm not sure if my version is buggy or what but I changed your code to the following to fix the problem:

if(version_compare(JVERSION,'1.7.0','ge')){
   $q = 'SELECT `template` FROM `#__template_styles` WHERE `client_id` ="0" AND `home`="1" ';
}
else if(version_compare(JVERSION,'1.6.0','ge')) {
   $q = 'SELECT `template` FROM `#__templates_styles` WHERE `client_id` ="0" AND `home`="1" ';
}
else {
   $q = 'SELECT `template` FROM `#__templates_menu` WHERE `client_id` ="0" ';
}


-Cleanshooter

- Cleanshooter

Milbo

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