News:

Looking for documentation? Take a look on our wiki

Main Menu

After update to 2.0.24b Fatal error

Started by pacbrother, November 20, 2013, 11:51:08 AM

Previous topic - Next topic

pacbrother

Hello, after upgrade to 2.0.24b i got the following fatal error:

Fatal error: Using $this when not in object context in /home/produtos/public_html/administrator/components/com_virtuemart/models/category.php on line 121

How can I fix this issue?

Thanks in advance,
Bruno

jenkinhill

You must update the aio component, too as you must update the category module.

If using a third party category module you will need to update that. 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

bomneukmc

Guys,

Could you give us some specific details in which files etc? Sometimes may be obvious for you, but not for everyone ;-)


kingramon0

I'm having the exact same issue. It only happens when I use "VirtueMart >> VirtueMart Categories Layout" as the Menu Item Type. I upgraded Joomla and VirtueMart to the latest versions yesterday. Virtuemart-aio is also updated. What else could we be missing?

kingramon0

I notice in the extension manager that the core VirtueMart Component is at 2.0.24b, but VirtueMart Category Module (ad many others) are at lower versions (like 2.0.8e). Is that normal? If not, how do I update them?

jenkinhill

VM Category module is showing 2.0.24b for me. They are always updated to current when the aio component is correctly installed.

There is no longer a VirtueMart Categories layout for the J! menu. This is taken from my 2.0.24b menu choice menu:

        Shopping Cart
        Category Layout
        Manufacturer Default Layout
        Manufacturer Details Layout
        List Orders
        Product Details Layout
        Account Maintenance
        User Edit Address
        Displays vendor contact
        Displays vendors
        Displays vendor details
        View vendor TOS
        Front page

If you want something like the old categories layout see http://forum.virtuemart.net/index.php?topic=120362.msg410100#msg410100
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

jenkinhill

@bomneukmc the file edit info is about how to update mod_virtuemart_category.php if it is included in your 3rd party categories module.
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

kingramon0

Quote from: jenkinhill on November 20, 2013, 23:25:43 PM
VM Category module is showing 2.0.24b for me. They are always updated to current when the aio component is correctly installed.

There is no longer a VirtueMart Categories layout for the J! menu. This is taken from my 2.0.24b menu choice menu:

        Shopping Cart
        Category Layout
        Manufacturer Default Layout
        Manufacturer Details Layout
        List Orders
        Product Details Layout
        Account Maintenance
        User Edit Address
        Displays vendor contact
        Displays vendors
        Displays vendor details
        View vendor TOS
        Front page

If you want something like the old categories layout see http://forum.virtuemart.net/index.php?topic=120362.msg410100#msg410100

I had to uninstall the virtuemart_allinone component and then reinstall it. It didn't work when I just installed over the old one (it said it succeeded but left older versions of stuff). I still have the VM Categories Layout showing, but it just doesn't work. I guess knowing that it isn't supposed to be there anymore makes me feel better about that.

Milbo

Please read here http://forum.virtuemart.net/index.php?topic=120413.msg410322#msg410322
it explains how you can get your old categories working and how to use the new method.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/