VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: z-analysts on November 29, 2014, 05:27:11 AM

Title: VM3 - Warning: Creating default object from empty value
Post by: z-analysts on November 29, 2014, 05:27:11 AM
Warning: Creating default object from empty value in /components/com_virtuemart/views/categories/view.html.php on line 83

I just upgraded a test site from 2.6.12.2 to 3.0.0 and now receive the above PHP warning when I display all categories.

link to page with error: http://zclientdev.com/solfairtrade/fair-trade-products

Joomla 2.5.27
PHP 5.4.33
Title: Re: VM3 - Warning: Creating default object from empty value
Post by: GJC Web Design on November 29, 2014, 11:27:18 AM
there is no /components/com_virtuemart/views/categories/view.html.php in VM3

the categories view was dropped in 2.0.6

sounds like a left over from old VM updates .. all category views are /components/com_virtuemart/views/category

change the menu that is calling this to a normal category view
Title: Re: VM3 - Warning: Creating default object from empty value
Post by: z-analysts on November 29, 2014, 15:59:35 PM
Why then  is "Virtuemart Categories Layout" still a selectable menu item type? I want to display all categories on a single page.
Title: Re: VM3 - Warning: Creating default object from empty value
Post by: jenkinhill on November 29, 2014, 16:59:25 PM
Presumably you still have an old categories directory in components/com_virtuemart/views/ from a much earlier version which is being seen by the new VM3 code.

Previously reported:  http://forum.virtuemart.net/index.php?topic=126899 

For showing all categories see this FAQ: http://forum.virtuemart.net/index.php?topic=120433.0
Title: Re: VM3 - Warning: Creating default object from empty value
Post by: z-analysts on November 29, 2014, 18:29:16 PM
Thank you! I made the necessary changes.