I have installed Virtuemart and a couple of modules (non-VM). I set up a few menu items (all VM related) and installed a module from yootheme (accordion) to display some articles in a module position. There is only one content section and within that only one category. That category has three articles and the yootheme/accordion module is configured to display all three articles. (this is a configuration that I have working satisfactorily in a development site using J1.5.3)
The module shows the articles but also shows a warning message as follows:
"Warning: Invalid argument supplied for foreach() in C:\www\EfaB_20080929\components\com_content\helpers\route.php on line 119"
On investigation, I found that I was able to resolve the issue by adding an additional is_array($items) test before line 117 is called and that appears to resolve the problem.
The problem appears to be caused by the absence of any menu items that are linked to com_content
in summary, changing components/com_content/helpers/route.php as follows resolved the problem:
Code: Select all
foreach($items as $item)
{
if ((@$item->query['view'] == $needle) && (@$item->query['id'] == $id)) {
$match = $item;
break;
}
}
Code: Select all
if(is_array($items))
{
foreach($items as $item)
{
if ((@$item->query['view'] == $needle) && (@$item->query['id'] == $id)) {
$match = $item;
break;
}
}
}
Regards
Phil