Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • jackdow Friend
    #117197

    Anyone know why I get this in the middle of my suckerfish menu having substituted 2 for 1 in line 30 (and masses of similar messages if I substitute 3 for 1)??

    Notice: Undefined offset: 1 in /home/jdowie/web/joomla/templates/ja_polaris/ja_cssmenu/ja-cssmenu.php on line 30

    Khanh Le Moderator
    #210543

    Dear jackdow,

    Please try to apply new code in file ja-cssmenu.php as following instruction:

    Find and remove code from line 23 to 42 (the switch ($row->type) block):
    [PHP]
    switch ($row->type) {
    case ‘separator’:
    case ‘component_item_link’:
    break;
    case ‘content_item_link’:
    $temp = split(“&task=view&id=”, $row->link);
    $row->link .= ‘&Itemid=’. $mainframe->getItemid($temp[1]);
    break;
    case ‘url’:
    if ( eregi( ‘index.php?’, $row->link ) ) {
    if ( !eregi( ‘Itemid=’, $row->link ) ) {
    $row->link .= ‘&Itemid=’. $row->id;
    }
    }
    break;
    case ‘content_typed’:
    default:
    $row->link .= ‘&Itemid=’. $row->id;
    break;
    }
    [/PHP]

    Insert new code to that position:

    [PHP]

    switch ($row->type) {
    case ‘separator’:
    case ‘component_item_link’:
    break;

    case ‘url’:
    if ( eregi( ‘index.php?’, $row->link ) ) {
    if ( !eregi( ‘Itemid=’, $row->link ) ) {
    $row->link .= ‘&Itemid=’. $row->id;
    }
    }
    break;

    case ‘content_item_link’:
    case ‘content_typed’:
    // load menu params
    $menuparams = new mosParameters( $row->params, $mainframe->getPath( ‘menu_xml’, $row->type ), ‘menu’ );

    $unique_itemid = $menuparams->get( ‘unique_itemid’, 1 );

    if ( $unique_itemid ) {
    $row->link .= ‘&Itemid=’. $row->id;
    } else {
    $temp = split(‘&task=view&id=’, $row->link);
    if (count($temp) > 1){
    if ( $row->type == ‘content_typed’ ) {
    $row->link .= ‘&Itemid=’. $mainframe->getItemid($temp[1], 1, 0);
    } else {
    $row->link .= ‘&Itemid=’. $mainframe->getItemid($temp[1], 0, 1);
    }
    }
    }
    break;

    default:
    $row->link .= ‘&Itemid=’. $row->id;
    break;
    }
    [/PHP]

    Please let me know if this could fix your problem.

    jackdow Friend
    #210556

    Many thanks… will try.. in meantime I found switching error reporting from system to simple ‘cured’ the problem (or at least prevented it having the same effect)

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

This topic contains 3 replies, has 2 voices, and was last updated by  jackdow 17 years, 7 months ago.

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