Author Topic: vmError: renderMail get Template failed vm 2.0.4  (Read 3334 times)

teobgeno

  • Jr. Member
  • **
  • Posts: 55
    • www.netpin.gr
vmError: renderMail get Template failed vm 2.0.4
« on: April 10, 2012, 05:29:31 am »
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

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4405
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: vmError: renderMail get Template failed vm 2.0.4
« Reply #1 on: April 10, 2012, 15:41:16 pm »
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

  • Jr. Member
  • **
  • Posts: 55
    • www.netpin.gr
Re: vmError: renderMail get Template failed vm 2.0.4
« Reply #2 on: April 10, 2012, 16:16:39 pm »
Can you give me a guide where this  check of joomla version exists in the source code ?
Thank you

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4405
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: vmError: renderMail get Template failed vm 2.0.4
« Reply #3 on: April 10, 2012, 17:00:46 pm »
try to change in ROOT\administrator\components\com_virtuemart\models\config.php
line 55

Code: [Select]
if(version_compare(JVERSION,'1.6.0','ge')) {
to
Code: [Select]
if (JVM_VERSION === 2) {

teobgeno

  • Jr. Member
  • **
  • Posts: 55
    • www.netpin.gr
Re: vmError: renderMail get Template failed vm 2.0.4
« Reply #4 on: April 10, 2012, 18:18:01 pm »
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)
Code: [Select]
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
Code: [Select]
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

  • Jr. Member
  • **
  • Posts: 81
    • LOYTEC electronics GmbH
Re: vmError: renderMail get Template failed vm 2.0.4
« Reply #5 on: April 12, 2012, 15:24:37 pm »
Thank you teobgeno!
On my Joomla 1.5, it works now after changing the com_virtuemart/helpers/shopfunctionf/shopfunctionsf.php
Thomas

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10087
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: vmError: renderMail get Template failed vm 2.0.4
« Reply #6 on: April 12, 2012, 15:31:21 pm »
Imho the fix is too dirty, please look here
http://forum.virtuemart.net/index.php?topic=100927.0
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

teobgeno

  • Jr. Member
  • **
  • Posts: 55
    • www.netpin.gr
Re: vmError: renderMail get Template failed vm 2.0.4
« Reply #7 on: April 12, 2012, 15:34:22 pm »
glad i could help thoma kai apo oti katalaba Elina kiolas :)