Author Topic: [fixed]Error in version 1.9.8H #__template_styles  (Read 1764 times)

Cleanshooter

  • Contributing Developer
  • Jr. Member
  • *
  • Posts: 69
    • My Blog
[fixed]Error in version 1.9.8H #__template_styles
« on: October 10, 2011, 20:45:54 pm »
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

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10040
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Error in version 1.9.8H
« Reply #1 on: October 10, 2011, 23:12:44 pm »
Thanks, already fixed and reported
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/