I had the free version of CB installed on a site I'm developing and kept receiving the following message anytime I clicked on a CB link:
Notice: Undefined index: view in <span>/</span>home<span>/</span>content/36/8718036/html/DOMAINS/xxxxxxxxx/components/com_content/router.php on line 48
I upgraded to the paid version hoping this would solve the problem, but no such luck.
Turning off SEF fixes the problem, but that's not a good solution for me.
I also noticed that deleting the router.php file from the path above also fixes the problem, but that's probably not a good idea.
The rest of my site works great -- CB is the only aspect that experiences this problem. I've seen several threads on the internet with people having the same message related to CB. Aside from turning off SEF or turning off error reporting, there are no real solutions.
Can anyone help with this?
BTW... Below is the code from the Router file in question. You'll notice that it pertains to section ID, etc. which is where the SEF comes into play. I've also seen a few threads that discuss issues with the itemID.
// are we dealing with an article or category that is attached to a menu item?
if (($menuItem instanceof stdClass) && $menuItem->query == $query && isset($query) && $menuItem->query == intval($query)) {
unset($query);
if (isset($query)) {
unset($query);
}
if (isset($query)) {
unset($query);
}
unset($query);
return $segments;
}
if ($view == 'category' || $view == 'article')
{
if (!$menuItemGiven) {
$segments[] = $view;
}
unset($query);
if ($view == 'article') {
if (isset($query) && isset($query) && $query) {
$catid = $query;
Last edit: 12 years 9 months ago by fancypants. Reason: More detail
Along with CB I also use jreviews on my site. You've got to love the jreviews guys... they sent me some code to replace in the router file and everything works perfectly now with the CB links -- no more Notice: Undefined index: view in /home/content/36/8718036/html/DOMAINS/xxxxxxx/components/com_content/router.php on line 48.
In the router.php file indicated above, simply replace: