News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Problem in VM3 updatesmigration.php

Started by effengia, December 03, 2014, 19:14:26 PM

Previous topic - Next topic

effengia

Hi,

The source code of administrator\components\com_virtuemart\controllers\updatesmigration.php contains the function installComplete, which has the following lines inside:

         if (!class_exists( 'ConfigModelApplication' )) require(JPATH_ADMINISTRATOR.DS.'components'.DS.'com_config'.DS.'models'.DS.'application.php');
         $jConfModel = new ConfigModelApplication();

This piece of code works fine with Joomla 2.5, but crashes with the following fatal error being executed in Joomla 3 environment: "Class 'ConfigModelForm' not found in \administrator\components\com_config\model\application.php on line 20"

The reason is in the changes made inside administrator\components\com_config\model\application.php in Joomla 3 comparing to Joomla 2.5. Now the ConfigModelApplication class is inherited from the ConfigModelForm class described in components\com_config\model\form.php.

Best regards,
Effengia Team
http://effengia.com

Milbo

You may try somethign like


if(JVM_VERSION>2){
if (!class_exists( 'ConfigModelCms' )) require(VMPATH_ROOT.DS.'components'.DS.'com_config'.DS.'model'.DS.'cms.php');
if (!class_exists( 'ConfigModelForm' )) require(VMPATH_ROOT.DS.'components'.DS.'com_config'.DS.'model'.DS.'application.php');
if (!class_exists( 'ConfigModelApplication' )) require(JPATH_ADMINISTRATOR.DS.'components'.DS.'com_config'.DS.'model'.DS.'application.php');
} else {
if (!class_exists( 'ConfigModelApplication' )) require(JPATH_ADMINISTRATOR.DS.'components'.DS.'com_config'.DS.'models'.DS.'application.php');
}
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

effengia

Yes, this is right the way of how it should be fixed before the full installer for Joomla 3 with VM3 is released.