WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.6 is now available!


Will it continue with WB? It goes on! | Geht es mit WB weiter? Es geht weiter!
https://forum.websitebaker.org/index.php/topic,32340.msg226702.html#msg226702


The forum email address board@websitebaker.org is working again
https://forum.websitebaker.org/index.php/topic,32358.0.html


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • show_menu2 error: $aOptions is invalid. No flags from group 1 supplied!
  • Print
Pages: [1]   Go Down

Author Topic: show_menu2 error: $aOptions is invalid. No flags from group 1 supplied!  (Read 32711 times)

Offline Craxx

  • Posts: 266
show_menu2 error: $aOptions is invalid. No flags from group 1 supplied!
« on: April 29, 2010, 10:38:43 AM »
Hy,

i get in the cgi_error.log the following error:
show_menu2 error: $aOptions is invalid. No flags from group 1 supplied!

How can i get rid off that?

best regards
Craxx;)
Logged
Craxx;)

Argos

  • Guest
Re: show_menu2 error: $aOptions is invalid. No flags from group 1 supplied!
« Reply #1 on: May 03, 2010, 09:53:09 AM »
Quote from: Craxx on April 29, 2010, 10:38:43 AM
Hy,

i get in the cgi_error.log the following error:
show_menu2 error: $aOptions is invalid. No flags from group 1 supplied!

How can i get rid off that?


Not sure what you mean with cgi_error.log, but there must be an error in your menu call. Check http://www.websitebakers.de/sm2/
Logged

Offline Craxx

  • Posts: 266
Re: show_menu2 error: $aOptions is invalid. No flags from group 1 supplied!
« Reply #2 on: May 03, 2010, 12:51:36 PM »
Hy Argos,

thx for answer. I looked in docu, but cannot see the error...? Could you please help. Here is my index.php from template:

Code: [Select]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>
<?php page_title(); ?>
</title>
<meta http-equiv="Content-Type" content="text/html; charset=<?php if(defined(&#39;DEFAULT_CHARSET&#39;)) { echo DEFAULT_CHARSET; } else { echo &#39;utf-8&#39;; }?>" />
<meta name="description" content="<?php page_description(); ?>" />
<meta name="keywords" content="<?php page_keywords(); ?>" />
<link rel="stylesheet" type="text/css" media="screen,projection" href="<?php echo TEMPLATE_DIR; ?>/layout4_setup.css" />
<link rel="stylesheet" type="text/css" media="screen,projection" href="<?php echo TEMPLATE_DIR; ?>/layout4_text.css" />
<link rel="stylesheet" type="text/css" href="<?php echo TEMPLATE_DIR; ?>/print.css" media="print" />
<title>???</title>
</head>
<!-- Global IE fix to avoid layout crash when single word size wider than column width -->
<!--[if IE]><style type="text/css"> body {word-wrap: break-word;}</style><![endif]-->
<body>
<body>
<!-- Main Page Container -->
<div class="page-container">
<!-- For alternative headers START PASTE here -->
<!-- A. HEADER -->
<div class="header">
  <!-- A.2 HEADER MIDDLE -->
  <div class="header-middle">
    <!-- Site message -->
    <div class="sitemessage"> </div>
  </div>
  <!-- A.3 HEADER BOTTOM -->
  <div class="header-bottom">
    <div class="nav2">
      <!-- Navigation item -->
<?php if(SHOW_MENU) { /* Only shown menu if we need to */ ?>
    <?php show_menu2(0, SM2_ROOT, SM2_START, SM2_PRETTY, &#39;<li [if(class==menu-current){id="menu-current"}]>[a]<span>[menu_title]</span></a>&#39;); ?>
    <?php } ?>
    </div>
  </div>
<!--   </div>  -->
  <!-- B. MAIN -->
  <div class="main">
    <!-- B.1 MAIN NAVIGATION -->
    <div class="main-navigation">
      <!-- Navigation Level 3 -->
      <div class="round-border-topright"></div>
 <h1 class="first">&Uuml;bersicht</h1>
      <!-- Navigation with grid style -->
 <?php show_menu2(0,      SM2_ROOT+1, SM2_CURR+1, SM2_PRETTY, &#39;<dt>[a][menu_title]</a>&#39;, &#39;</dt>&#39;, &#39;<dl class="nav3-grid">&#39; , &#39;</dl>&#39;);?>
 
<br><br>
    <div class="searchform">
      <?php if(SHOW_SEARCH) { /* Only show search box if search is enabled */ ?>
      <fieldset>
      <form name="search" action="<?php echo WB_URL; ?>/search/index<?php echo PAGE_EXTENSION; ?>" method="post" class="field" />
      <input value="" name="string" class="field" />
      <input type="submit" value="Suchen" name="submit" />
      </fieldset>
      </form>
      <?php } ?>
    </div>
 
      <!-- Template infos -->
       <?php
        
if(FRONTEND_LOGIN == &#39;enabled&#39; AND VISIBILITY != &#39;private&#39; AND $wb->get_session(&#39;USER_ID&#39;) == &#39;&#39;) {
        
?>

      <form name="login" action="<?php echo LOGIN_URL; ?>" method="post" class="login_table">
        <h1><?php echo $TEXT[&#39;LOGIN&#39;]; ?></h1>
        <p><?php echo $TEXT[&#39;USERNAME&#39;]; ?>:</p>
        <p><input type="text" name="username" style="text-transform: lowercase;" /></p>
        <p><?php echo $TEXT[&#39;PASSWORD&#39;]; ?>:</p>
        <p><input type="password" name="password" /></p>
        <p><?php if(is_numeric(FRONTEND_SIGNUP)) { ?>
        <a href="<?php echo SIGNUP_URL; ?>"><?php echo $TEXT[&#39;SIGNUP&#39;]; ?></a>
        <?php } ?></p>
      </form>
      <?php
        
} elseif(FRONTEND_LOGIN == &#39;enabled&#39; AND is_numeric($wb->get_session(&#39;USER_ID&#39;))) {
        
?>

      <p><form name="logout" action="<?php echo LOGOUT_URL; ?>" method="post" class="login_table"></p>
        <h1><?php echo $TEXT[&#39;LOGGED_IN&#39;]; ?></h1>
        <p><?php echo $TEXT[&#39;WELCOME_BACK&#39;]; ?>, <?php echo $wb->get_display_name(); ?> <br /></p>
        <p><input type="submit" name="submit" value="<?php echo $MENU[&#39;LOGOUT&#39;]; ?>" /><p>
      <p><a href="<?php echo PREFERENCES_URL; ?>"><?php echo $MENU[&#39;PREFERENCES&#39;]; ?></a></p><p> <a href="<?php echo ADMIN_URL; ?>/index.php"><?php echo $TEXT[&#39;ADMINISTRATION&#39;]; ?></a></p>
      </form>
<p><a href="javascript:window.print()">Diese Seite drucken</a></p>
      <p><?php frontend_edit(); ?></p>
      <p><a href="<?php echo ADMIN_URL; ?>/index.php" target="_blank"><?php echo "Administration der Website" ?></p>
      <?php
        
}
        
?>

    </div>
    <!-- B.2 MAIN CONTENT -->
    <div class="main-content">
      <!-- Pagetitle -->
      <br>
      <h1 class="pagetitle"><?php echo PAGE_TITLE; ?></h1>
      <!-- Content unit - One column -->
      <div class="column1-unit">
         <?php page_content(); ?>
      </div>
    </div>


  <!-- C. FOOTER AREA -->  
  <div class="footer">
    <p><?php page_footer(); ?></p>
    <p class="credits">designed by Administrator und Webmaster <a href="http://www.???.com" target="_blank"><?php echo "???" ?></a></p>
  </div>
</div>
</body>
</html>


THX and best regards
Craxx;)
« Last Edit: May 03, 2010, 01:14:14 PM by ruebenwurzel »
Logged
Craxx;)

Argos

  • Guest
Re: show_menu2 error: $aOptions is invalid. No flags from group 1 supplied!
« Reply #3 on: May 03, 2010, 01:01:03 PM »
You have 2 menu calls:

Code: [Select]
<?php show_menu2(0, SM2_ROOT, SM2_START, SM2_PRETTY, &#39;<li [if(class==menu-current){id="menu-current"}]>[a]<span>[menu_title]</span></a>&#39;); ?>
Code: [Select]
<?php show_menu2(0, SM2_ROOT+1, SM2_CURR+1, SM2_PRETTY, &#39;<dt>[a][menu_title]</a>&#39;, &#39;</dt>&#39;, &#39;<dl class="nav3-grid">&#39; , &#39;</dl>&#39;);?>
One of them or both generate the error. Please look in the menu docu what part of the menu(s) $aOptions exactly is, and correct the call. I don't have time right now to investigate for you. But there must be something wrong with your menu call(s). Investigate by using elementary calls first, like

Code: [Select]
<?php show_menu2(0); ?>
to see what menu is wrong.
Logged

Offline Craxx

  • Posts: 266
Re: show_menu2 error: $aOptions is invalid. No flags from group 1 supplied!
« Reply #4 on: May 03, 2010, 03:11:06 PM »
Hy Argos,

thx for answer and tipp. On bothe there is an error with SM2_PRETTY. There is no error with:

<?php show_menu2(0, SM2_ROOT, SM2_START); ?>    

-> The Menu on top is ok!!!

and

<?php show_menu2(0,      SM2_ROOT+1, SM2_CURR+1);?>

-> The Menue on the left side is not correct formatted.

But it is an error when i write
<?php show_menu2(0, SM2_ROOT+1, SM2_CURR+1, '<dt>[a][menu_title]</a>', '</dt>', '<dl class="nav3-grid">' , '</dl>');?>


The original Template is Multiflex-1 and i modified it for me. When i use the Multiflex-1 Template i have same errors.
Please can you give me another tipp.

THX and best regards
Craxx;)
« Last Edit: May 03, 2010, 03:18:55 PM by Craxx »
Logged
Craxx;)

Offline BerndJM

  • Posts: 1764
  • Gender: Male
Re: show_menu2 error: $aOptions is invalid. No flags from group 1 supplied!
« Reply #5 on: May 04, 2010, 01:28:50 AM »
O.k.

let's have a lookm into the readme file:


$aOptions 
Specify flags for different generation options for the menu. The flags
may be combined together using bitwise OR (|). For example, to specify
both TRIM and PRETTY you should use, (SM2_TRIM | SM2_PRETTY).

GROUP 1
-------
Exactly one flag from this group must always be supplied. These flags
affect how the siblings in the tree are removed from the output.
   
GROUP 2
-------
All of these flags are optional. Any number of them may be combined.


Regards Bernd
Logged
In theory, there is no difference between theory and practice. But, in practice, there is.

Offline Craxx

  • Posts: 266
Re: show_menu2 error: $aOptions is invalid. No flags from group 1 supplied!
« Reply #6 on: May 04, 2010, 07:59:20 AM »
Hello Bernd,

thx for answer. Yes i read that in readme, but did you read my post? I have no error, when there is only


<?php show_menu2(0, SM2_ROOT, SM2_START); ?>    

and

<?php show_menu2(0,      SM2_ROOT+1, SM2_CURR+1);?>

Only when there is

<?php show_menu2(0, SM2_ROOT+1, SM2_CURR+1, '<dt>[a][menu_title]</a>', '</dt>', '<dl class="nav3-grid">' , '</dl>');?>

there is an error.

Here you can see my work:
http://www.anglerbund-ansbach.de/wb/

I am a rookie in programming and the first problem ist that the original template has the same problem. Perhaps somebody could help me. Here is the original template:

http://www.websitebaker2.org/template/pages/templates.php?id=73&Keywords=multiflex

THX a lot and best regards
Craxx;)
« Last Edit: May 04, 2010, 08:02:19 AM by Craxx »
Logged
Craxx;)

Argos

  • Guest
Re: show_menu2 error: $aOptions is invalid. No flags from group 1 supplied!
« Reply #7 on: May 04, 2010, 08:54:22 AM »
Try replacing <dt> and </dt> with <li> and </li>
And replacing <dl> and </dl> with <ul> and </ul>

Don't forget modifying your stylesheet.

And try to get rid of the errors, your site doesn't validate. See http://validator.w3.org/

I wouldn't mind too much though, the menu seems to be working fine.
Logged

Offline DarkViper

  • Forum administrator
  • *****
  • Posts: 3087
  • Gender: Female
Re: show_menu2 error: $aOptions is invalid. No flags from group 1 supplied!
« Reply #8 on: May 04, 2010, 11:19:34 AM »
Code: (your code) [Select]
<?php show_menu2(0, SM2_ROOT+1, SM2_CURR+1, &#39;<dt>[a][menu_title]</a>&#39;, &#39;</dt>&#39;, &#39;<dl class="nav3-grid">&#39; , &#39;</dl>&#39;);?>
your call of 'show_menu' is definitely wrong.

take a look to the definition. and do not forget the simple math.-rules about brackets.

Code: [Select]
<?php  show_menu2( [$aMenu,[$aStart,[$aMaxLevel,[$aOptions,[$aItemOpen,[$aItemClose,[$aMenuOpen,[$aMenuClose,[$aTopItemOpen,[$aTopMenuOpen]]]]]]]]]] ); ?>
« Last Edit: May 04, 2010, 10:24:15 PM by DarkViper »
Logged
Der blaue Planet - er ist nicht unser Eigentum - wir haben ihn nur von unseren Nachkommen geliehen

"We need education to cope with digitalization - and NOT the digitalization of education.!"

Tägliches Stoßgebet: Oh Herr, wirf Hirn vom Himmel !

Offline BerndJM

  • Posts: 1764
  • Gender: Male
Re: show_menu2 error: $aOptions is invalid. No flags from group 1 supplied!
« Reply #9 on: May 04, 2010, 08:28:46 PM »
Again the f**** manual:

$aMenu will be 0 for most people.

$aStart must be either a page ID or a value starting with "SM2_".

$aMaxLevel must be only values that start with "SM2_".

$aOptions must be only values that start with "SM2_" (unless you are
in a very small minority of users).

All other parameters are the HTML tag templates that will be
output for menus and menu items.

What this mean in your case?
Code: [Select]
$aMenu = 0,
$aStart = SM2_ROOT+1,
$aMaxLevel =  SM2_CURR+1,
$aOptions = '<dt>[a][menu_title]</a>'
You have the HTML-Syntax for $aItemOpen as $aOptions ...

Regards Bernd
Logged
In theory, there is no difference between theory and practice. But, in practice, there is.

Offline Craxx

  • Posts: 266
Re: show_menu2 error: $aOptions is invalid. No flags from group 1 supplied!
« Reply #10 on: May 05, 2010, 08:36:59 AM »
Oh oh oh thx a lot for your advice.... So i hope to get that in the right way. I will take my time to change and test values. Hope i can ask when i am too rookie to get that in the right way.....

thx a lot and best regards
Craxx;)
Logged
Craxx;)

Offline Craxx

  • Posts: 266
Re: show_menu2 error: $aOptions is invalid. No flags from group 1 supplied!
« Reply #11 on: July 27, 2010, 11:41:20 AM »
After a long time i have to less time and much more less knowledge to correct the template.

HMMM, perhaps it is possible for the cracks to correct my template in a few minutes. Please help me...
Tell me a price, i will pay for it:)

THX a lot:)
Craxx;)
Logged
Craxx;)

Offline Craxx

  • Posts: 266
Re: show_menu2 error: $aOptions is invalid. No flags from group 1 supplied!
« Reply #12 on: July 28, 2010, 04:31:07 PM »
It is solved - erpe helped me. THX a lot:)

best regards
Craxx;)
Logged
Craxx;)

Offline Tomno399

  • Posts: 211
Re: show_menu2 error: $aOptions is invalid. No flags from group 1 supplied!
« Reply #13 on: July 01, 2016, 09:05:24 AM »
I am really glad that ERPE helped you. But what shall we other do? My server logfile is filled with this errors and ich would like to change it clean but I am not a coder. What shall I do?

In the template "Sobresot" I have more than one call of the show_menu2, but I don't know which one (or more?) is wrong:

Code: [Select]
show_menu2(0, SM2_ROOT, SM2_CURR, SM2_CRUMB, '<span class="[class]"> &raquo; [a][menu_title]</a></span>', '', '', '', ''.$breadcrumbstart.' &raquo; <span class="[class]">[a][menu_title]</a></span>');
Code: [Select]
show_menu2(1, SM2_ROOT+1, SM2_ALL, SM2_ALL, '<li class="[class]"><a href="[url]" target=[target] class="[class]"><span>[menu_title]</span></a>', "</li>", '<ul>', '</ul>', true, '<ul id="topmenu" class="nav sm sm-clean">');
Code: [Select]
show_menu2(1, SM2_CURR+1, SM2_CURR+1, '', '<li class="[class]">[a][menu_title]</a></li>', '', '', '', '');
And how can I repair it?


Logged

Offline dbs

  • Betatester
  • **
  • Posts: 8914
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: show_menu2 error: $aOptions is invalid. No flags from group 1 supplied!
« Reply #14 on: July 01, 2016, 11:15:34 AM »
Hi, in your third code is the 4th parameter missing.
Try SM2_TRIM
Code: [Select]
show_menu2(1, SM2_CURR+1, SM2_CURR+1, 'SM2_TRIM', '<li class="[class]">[a][menu_title]</a></li>', '', '', '', '');
Logged
https://onkel-franky.de

Offline Tomno399

  • Posts: 211
Re: show_menu2 error: $aOptions is invalid. No flags from group 1 supplied!
« Reply #15 on: July 01, 2016, 02:22:14 PM »
Done - with aposthrophe ' xxx '?

Thank you dbs, I will have a look tomorrow on the server logfile and post it here.

Tom
Logged

Offline jacobi22

  • Betatester
  • **
  • Posts: 5920
Re: show_menu2 error: $aOptions is invalid. No flags from group 1 supplied!
« Reply #16 on: July 01, 2016, 02:36:36 PM »
Quote from: Tomno399 on July 01, 2016, 02:22:14 PM
Done - with aposthrophe ' xxx '?

without apostrophe!
Logged

Offline dbs

  • Betatester
  • **
  • Posts: 8914
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: show_menu2 error: $aOptions is invalid. No flags from group 1 supplied!
« Reply #17 on: July 01, 2016, 03:10:46 PM »
Ooops, jacobi22 is right.
Logged
https://onkel-franky.de

Offline Tomno399

  • Posts: 211
Solved: show_menu2 error: $aOptions is invalid. No flags from group 1 supplied!
« Reply #18 on: July 03, 2016, 05:28:10 AM »
Without aposthropes = no more error messages!

Thank you dbs, thank you jacobi22!
Logged

Offline jacobi22

  • Betatester
  • **
  • Posts: 5920
Re: show_menu2 error: $aOptions is invalid. No flags from group 1 supplied!
« Reply #19 on: August 03, 2016, 11:42:13 AM »
please read the instructions for this module, both menu's are incomplete
Quote
GROUP 1
    -------
    Exactly one flag from this group must always be supplied. These flags
    affect how the siblings in the tree are removed from the output.

   SM2_ALL or
   SM2_TRIM or
   SM2_CRUMB or
   SM2_SIBLING

here an example
Code: [Select]
<?php show_menu2(0, SM2_ROOT+1, SM2_CURR+1, SM2_ALL|SM2_PRETTY, '<dt>[a][menu_title]</a>', '</dt>', '<dl class="nav3-grid">' , '</dl>'); ?>
« Last Edit: August 03, 2016, 11:57:24 AM by jacobi22 »
Logged

Offline Hans

  • Posts: 914
  • Gender: Male
Re: show_menu2 error: $aOptions is invalid. No flags from group 1 supplied!
« Reply #20 on: February 13, 2017, 04:07:52 PM »
Hi jacobi22

I find it very, very hard to understand the working of show_menu2. E.g.
I can't find anything wrong in this code:
Code: [Select]
<?php show_menu2(0, SM2_ROOT, SM2_ALL, SM2_ALL|SM2_PRETTY, '<li><a href="[url]" class="[class]"><span>[menu_title]</span></a>', "</li>", '<ul>', "</ul>", true, '<ul id="main-menu" class="sm sm-mint">' , '</ul>'); ?>
But I keep getting
Quote
[13-Feb-2017 14:44:42 Etc\/UTC] show_menu2 error: $aOptions is invalid. No flags from group 1 supplied!"

In my humble opinion my code is equal to the code you provided (except specific elements of course). Being a little bit dyslectic I can imagine that I don't see something wrong but after looking for what seems the 1000th time time I really can't get a solution for the error message.

Hope you can get me on the right path ;-)
Logged
Hans - Nijmegen - The Netherlands

Offline jacobi22

  • Betatester
  • **
  • Posts: 5920
Re: show_menu2 error: $aOptions is invalid. No flags from group 1 supplied!
« Reply #21 on: February 13, 2017, 04:41:17 PM »
do you have more Show_menu2-Call's in your template?

the menu from your last posting produce no errors

look to the fourth place in the menu call

show_menu2(0, SM2_ROOT, SM2_ALL, SM2_ALL|SM2_PRETTY,

#1 = Number of the menu / Menu-ID
#2 = Start-Level
#3 = max Level
#4 =  Option

Option has two groups -

Group1: () Exactly one flag from this group must always be supplied.
SM2_ALL        or
SM2_TRIM      or
SM2_CRUMB   or
SM2_SIBLING

Group2 are optional
Logged

Offline Hans

  • Posts: 914
  • Gender: Male
Re: show_menu2 error: $aOptions is invalid. No flags from group 1 supplied!
« Reply #22 on: February 13, 2017, 08:08:26 PM »
Quote
do you have more Show_menu2-Call's in your template?

YES!
Didn't think about it. Will see and test, but I am confident that the errors are gone after that. Thank you!
Logged
Hans - Nijmegen - The Netherlands

Offline Hans

  • Posts: 914
  • Gender: Male
Re: show_menu2 error: $aOptions is invalid. No flags from group 1 supplied!
« Reply #23 on: February 13, 2017, 08:15:44 PM »
Quote from: Hans on February 13, 2017, 08:08:26 PM
Quote
do you have more Show_menu2-Call's in your template?

YES!
Didn't think about it. Will see and test, but I am confident that the errors are gone after that. Thank you!

UPDATE: YES! Everything works without errors. Thanks again.
Logged
Hans - Nijmegen - The Netherlands

Offline jacobi22

  • Betatester
  • **
  • Posts: 5920
Re: show_menu2 error: $aOptions is invalid. No flags from group 1 supplied!
« Reply #24 on: February 13, 2017, 08:18:58 PM »
 (Y) (Y)
Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • show_menu2 error: $aOptions is invalid. No flags from group 1 supplied!
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2