test
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • Adrien GEORGE Friend
    #137180

    Hello,
    I have a problem with the templates JA Rutile on my site http://www.gueuledefoot.com
    It appears on the top of the site :

    Warning: Invalid argument supplied for foreach() in /home.44/g/u/e/gueulede/www/templates/ja_rutile/ja_menus/Base.class.php on line 62

    I am on joomla 1.5.9,

    thanks in advance,
    Adrien

    Anonymous Moderator
    #287047

    Hi,

    Please open file templates/ja_rutile/ja_menus/Base.class.php, at about line 62, find following script:

    [PHP]foreach ($rows as $index => $v) {
    if ($v->access <= $user->get(‘aid’,0)) {
    $pt = $v->parent;
    $list = @ $children[$pt] ? $children[$pt] : array ();

    switch ($v->type)
    {
    case ‘url’ :
    if ((strpos($v->link, ‘index.php?’) !== false) && (strpos($v->link, ‘Itemid=’) === false)) {
    $v->url = $v->link.’&Itemid=’.$v->id;
    } else {
    $v->url = $v->link;
    }
    break;

    default :
    $router = JSite::getRouter();
    $v->url = $router->getMode() == JROUTER_MODE_SEF ? ‘index.php?Itemid=’.$v->id : $v->link.’&Itemid=’.$v->id;
    break;

    }
    // Handle SSL links
    $iParams = $this->createParameterObject($v->params);
    $iSecure = $iParams->def(‘secure’, 0);
    if ($v->home == 1) {
    $v->url = JURI::base();
    } elseif (strcasecmp(substr($v->url, 0, 4), ‘http’) && (strpos($v->link, ‘index.php?’) !== false)) {
    $v->url = JRoute::_($v->url, true, $iSecure);
    } else {
    $v->url = str_replace(‘&’, ‘&’, $v->url);
    }

    $v->_idx = count($list);
    array_push($list, $v);
    $children[$pt] = $list;
    }
    $cacheIndex[$v->id] = $index;
    $this->items[$v->id] = $v;
    }[/PHP]

    and change to:

    [PHP]
    if (sizeof($rows) > 0) {
    foreach ($rows as $index => $v) {
    if ($v->access <= $user->get(‘aid’,0)) {
    $pt = $v->parent;
    $list = @ $children[$pt] ? $children[$pt] : array ();

    switch ($v->type)
    {
    case ‘url’ :
    if ((strpos($v->link, ‘index.php?’) !== false) && (strpos($v->link, ‘Itemid=’) === false)) {
    $v->url = $v->link.’&Itemid=’.$v->id;
    } else {
    $v->url = $v->link;
    }
    break;

    default :
    $router = JSite::getRouter();
    $v->url = $router->getMode() == JROUTER_MODE_SEF ? ‘index.php?Itemid=’.$v->id : $v->link.’&Itemid=’.$v->id;
    break;

    }
    // Handle SSL links
    $iParams = $this->createParameterObject($v->params);
    $iSecure = $iParams->def(‘secure’, 0);
    if ($v->home == 1) {
    $v->url = JURI::base();
    } elseif (strcasecmp(substr($v->url, 0, 4), ‘http’) && (strpos($v->link, ‘index.php?’) !== false)) {
    $v->url = JRoute::_($v->url, true, $iSecure);
    } else {
    $v->url = str_replace(‘&’, ‘&’, $v->url);
    }

    $v->_idx = count($list);
    array_push($list, $v);
    $children[$pt] = $list;
    }
    $cacheIndex[$v->id] = $index;
    $this->items[$v->id] = $v;
    }
    }[/PHP]

    Hope it helps.

    Adrien GEORGE Friend
    #287471

    It worked ! Thanks again

Viewing 3 posts - 1 through 3 (of 3 total)

This topic contains 3 replies, has 2 voices, and was last updated by  Adrien GEORGE 15 years, 11 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum