1
stickie
Multi-Menu and Undefined offset
  • 2004/6/7 19:22

  • stickie

  • Just popping in

  • Posts: 7

  • Since: 2004/1/31


I couldnt find any relevant posts regarding this problem, so i'm hoping this post will shed some light on whats going wrong.

I've installed the module Multi-Menu 1.3 with no problem. Everything runs good until i "Edit" a multimenu block. I can add as many links as i want and it will show up. But as soon as i edit the block to rename it, or change the pages it shows up on, it disappears and i get the following error msg:

Notice [PHP]: Undefined offset: 1 in file modules/multiMenu/blocks/multimenu.php line 8

Heres the contents of multimenu.php:


function multimenu_show($options) {
    global 
$xoopsDB,$xoopsUser;
    
$myts =& MyTextSanitizer::getInstance();
    
$block = array();
    
$group is_object($xoopsUser) ? $xoopsUser->getGroups() : array(XOOPS_GROUP_ANONYMOUS);
    
$result $xoopsDB->query("SELECT groups, link, title, target, imageurl FROM ".$xoopsDB->prefix("multimenu").$options[1]." WHERE hide=0 ORDER BY weight ASC");
    while ( 
$myrow $xoopsDB->fetchArray($result) ) {
        
$title $myts->makeTboxData4Show($myrow["title"]);
        if ( !
XOOPS_USE_MULTIBYTES ) {
            if (
strlen($myrow['title']) >= $options[0]) {
                
$title $myts->makeTboxData4Show(substr($myrow['title'],0,($options[0]-1)))."...";
            }
        }
        
$groups explode(" ",$myrow['groups']);
        if (
count(array_intersect($group,$groups)) > 0) {
            
$imenu['title'] = $title;
            
$imenu['target'] = $myrow['target'];
            
$imenu['link'] = $myrow['link'];
            
$imenu['imageurl'] = $myrow['imageurl'];
            if (
eregi("^[([a-z0-9]+)]$"$myrow['link'], $moduledir)) {
                
$module_handler = & xoops_gethandler'module' );
                
$module =& $module_handler->getByDirname($moduledir[1]);
                if ( 
is_object$module ) && $module->getVar'isactive' ) ) {
                    
$imenu['link'] = XOOPS_URL."/modules/".$moduledir[1];
                }
            }
                    
$block['contents'][] = $imenu;
        }
        }
        return 
$block;
}

function 
multimenu_edit($options) {
    
$form _BM_MULTIMENU_CHARS..$options[0]."' /> "._BM_MULTIMENU_LENGTH."";
    return 
$form;
}

?>


I think all i really have to do is click on the "Edit" link and not even change anything, and it breaks.

I've been successfull at installing other modules today, so i've ruled out bad uploads.

Any of you have an idea of what could be going wrong?



On:
RHE 3
PHP 4.3.4
XOOPS 2.0.6

2
JohnS
Re: Multi-Menu and Undefined offset
  • 2004/8/17 15:26

  • JohnS

  • Just popping in

  • Posts: 7

  • Since: 2004/8/10


I've got the same problem... Did you ever find a solution? thanks!

3
hervet
Re: Multi-Menu and Undefined offset
  • 2004/8/17 17:06

  • hervet

  • Friend of XOOPS

  • Posts: 2267

  • Since: 2003/11/4


Hello,

This bug has been corrected recently. You can find the latest version here

Bye,
Hervé

4
JohnS
Re: Multi-Menu and Undefined offset
  • 2004/8/18 14:54

  • JohnS

  • Just popping in

  • Posts: 7

  • Since: 2004/8/10


Thanks, got it. I'll install today, appreciate the help.

5
stickie
Re: Multi-Menu and Undefined offset
  • 2005/1/20 16:00

  • stickie

  • Just popping in

  • Posts: 7

  • Since: 2004/1/31


sweet, thanks!

Login

Who's Online

379 user(s) are online (290 user(s) are browsing Support Forums)


Members: 0


Guests: 379


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits