News:

Looking for documentation? Take a look on our wiki

Main Menu

vmError: renderMail get Template failed vm 2.0.4

Started by teobgeno, April 10, 2012, 05:29:31 AM

Previous topic - Next topic

teobgeno

I get an error when i change order status at backened   joomla 1.5.26 Vm 2.0.4

vmError: renderMail get Template failed: Table 'photo.jos_template_styles' doesn't exist SQL=SELECT `template` FROM `jos_template_styles` WHERE `client_id`="0" AND `home`="1"

I know this table does not exists in joomla 1.5.x versions and is probably at newer versions of joomla.
Is there a setting to disable this procedure or it is source code case.

Studio 42

in normal case j1.5 use
'SELECT `template` FROM `#__templates_menu`

and we test the joomla version, it's very strange , you have this query in joomla 1.5.

I have updated to the new method to compare joomla version, but it's only in the SVN files for now.

teobgeno

Can you give me a guide where this  check of joomla version exists in the source code ?
Thank you

Studio 42

try to change in ROOT\administrator\components\com_virtuemart\models\config.php
line 55

if(version_compare(JVERSION,'1.6.0','ge')) {

to

if (JVM_VERSION === 2) {

teobgeno

Thank you for your reply

The administrator/components/com_virtuemart/models/config.php is ok the error was at

com_virtuemart/helpers/shopfunctionf/shopfunctionsf.php  -> function renderMail (line 186)

if(JVM_VERSION == 2){
   $q = 'SELECT `template` FROM `#__template_styles` WHERE `client_id`="0" AND `home`="1"';
} else {
  $q = 'SELECT `template` FROM `#__template_styles` WHERE `client_id`="0" AND `home`="1"';
}


The if statement functionality is correct  but the query is the same for both versions. This must be modified as

if(JVM_VERSION == 2){
   $q = 'SELECT `template` FROM `#__template_styles` WHERE `client_id`="0" AND `home`="1"';
} else {
  $q = 'SELECT `template` FROM `#__templates_menu` WHERE `client_id` ="0" ';
}


Thomas Kuschel

Thank you teobgeno!
On my Joomla 1.5, it works now after changing the com_virtuemart/helpers/shopfunctionf/shopfunctionsf.php
Thomas

Milbo

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

teobgeno

glad i could help thoma kai apo oti katalaba Elina kiolas :)