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

warning on views\category\view.html.php

Started by sandum150, August 14, 2013, 08:24:03 AM

Previous topic - Next topic

sandum150

I've gor this message on the top of product category page:

Warning: Creating default object from empty value in C:\xampp\htdocs\volta25\components\com_virtuemart\views\category\view.html.php on line 187

joomla 2.5.11
virtuemart 2.0.22a
php 5.5.1

Lexiboy

Did you modify the template?
If so, than please paste line 187, or better, the block of code that it is part of.
With kind regards,
Alex Stienstra

sandum150

Just made override of tmpl/default.php. The view.html.php wasn't modified.

the code is:
            if(JVM_VERSION === 2 ) {
               $results = $dispatcher->trigger('onContentPrepare', array('com_virtuemart.category', &$category, &$params, 0));
               // More events for 3rd party content plugins
               // This do not disturb actual plugins, because we don't modify $product->text
               $res = $dispatcher->trigger('onContentAfterTitle', array('com_virtuemart.category', &$category, &$params, 0));
               $category->event->afterDisplayTitle = trim(implode("\n", $res));

               $res = $dispatcher->trigger('onContentBeforeDisplay', array('com_virtuemart.category', &$category, &$params, 0));
               $category->event->beforeDisplayContent = trim(implode("\n", $res));

               $res = $dispatcher->trigger('onContentAfterDisplay', array('com_virtuemart.category', &$category, &$params, 0));
               $category->event->afterDisplayContent = trim(implode("\n", $res));
            }

and the 187th line is:
               $category->event->afterDisplayTitle = trim(implode("\n", $res));

sandum150

#3
Now I put the original file default.php, after that tried to disable de override. The problem is the same.
nobody knows what is the problem??

Maxim Pishnyak

You could turn off displaying unimportant warnings in your Joomla configuration.
You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart

jenkinhill

Possibly related to using PHP5.5 - version development is currently based on PHP5.3 (many users still are on servers with PHP5.2). You can turn off the warning. http://forum.virtuemart.net/index.php?topic=102555.0
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