News:

Looking for documentation? Take a look on our wiki

Main Menu

Fatal Error in category.php (VM 2.0.24b)

Started by SteP[IT], November 20, 2013, 14:13:03 PM

Previous topic - Next topic

SteP[IT]

After upgrading from 2.0.24a to 2.0.24b the website frontend does not load anymore: turning on errors, it arises this error:

Fatal error: Using $this when not in object context in D:\<site path>\administrator\components\com_virtuemart\models\category.php on line 121

Could you please help us to address and fix the error? To have the site working we had to downgrade to the previous 24a version

Thank you in advance
Regards
J 3.9.2 - VM 3.4.3

MMC EDIZIONI - Italian High-Quality PaperBooks Publisher
Site: https://www.mmcedizioni.it

Darus

Step could you detail the downgrade procedure please. Same issue on my site.

SteP[IT]

Simply download the 24a version, and install it using standard Joomla installer.
J 3.9.2 - VM 3.4.3

MMC EDIZIONI - Italian High-Quality PaperBooks Publisher
Site: https://www.mmcedizioni.it


jenkinhill

The error indicates that the aio component has not been updated, as you must update the modules, too. 
Alternatively you are using a modified/third party category module which needs updating. The following is from the liveupdate info:

please search for
JFactory::getCache and delete this line. If you are unsure about this, you can skip this step.

Search also for
$cache->call( array( 'VirtueMartModelCategory', 'getChildCategoryList' ),$vendorId, $category->virtuemart_category_id );
and replace it by
VmModel::getModel('category')->getChildCategoryList($vendorId, $category->virtuemart_category_id );

Be aware it can be also $child instead of $category. the part behind getChildCategoryList stays the same. This change enhances in some stores drastically the speed. For more information or if you need help, you may read here http://forum.virtuemart.net/index.php?topic=120284#msg410104
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

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/