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;)
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/
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:
<!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('DEFAULT_CHARSET')) { echo DEFAULT_CHARSET; } else { echo 'utf-8'; }?>" />
<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, '<li [if(class==menu-current){id="menu-current"}]>[a]<span>[menu_title]</span></a>'); ?>
<?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">Übersicht</h1>
<!-- Navigation with grid style -->
<?php show_menu2(0, SM2_ROOT+1, SM2_CURR+1, SM2_PRETTY, '<dt>[a][menu_title]</a>', '</dt>', '<dl class="nav3-grid">' , '</dl>');?>
<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 == 'enabled' AND VISIBILITY != 'private' AND $wb->get_session('USER_ID') == '') {
?>
<form name="login" action="<?php echo LOGIN_URL; ?>" method="post" class="login_table">
<h1><?php echo $TEXT['LOGIN']; ?></h1>
<p><?php echo $TEXT['USERNAME']; ?>:</p>
<p><input type="text" name="username" style="text-transform: lowercase;" /></p>
<p><?php echo $TEXT['PASSWORD']; ?>:</p>
<p><input type="password" name="password" /></p>
<p><?php if(is_numeric(FRONTEND_SIGNUP)) { ?>
<a href="<?php echo SIGNUP_URL; ?>"><?php echo $TEXT['SIGNUP']; ?></a>
<?php } ?></p>
</form>
<?php
} elseif(FRONTEND_LOGIN == 'enabled' AND is_numeric($wb->get_session('USER_ID'))) {
?>
<p><form name="logout" action="<?php echo LOGOUT_URL; ?>" method="post" class="login_table"></p>
<h1><?php echo $TEXT['LOGGED_IN']; ?></h1>
<p><?php echo $TEXT['WELCOME_BACK']; ?>, <?php echo $wb->get_display_name(); ?> <br /></p>
<p><input type="submit" name="submit" value="<?php echo $MENU['LOGOUT']; ?>" /><p>
<p><a href="<?php echo PREFERENCES_URL; ?>"><?php echo $MENU['PREFERENCES']; ?></a></p><p> <a href="<?php echo ADMIN_URL; ?>/index.php"><?php echo $TEXT['ADMINISTRATION']; ?></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;)
You have 2 menu calls:
<?php show_menu2(0, SM2_ROOT, SM2_START, SM2_PRETTY, '<li [if(class==menu-current){id="menu-current"}]>[a]<span>[menu_title]</span></a>'); ?>
<?php show_menu2(0, SM2_ROOT+1, SM2_CURR+1, SM2_PRETTY, '<dt>[a][menu_title]</a>', '</dt>', '<dl class="nav3-grid">' , '</dl>');?>
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
<?php show_menu2(0); ?>
to see what menu is wrong.
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;)
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
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;)
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.
<?php show_menu2(0, SM2_ROOT+1, SM2_CURR+1, '<dt>[a][menu_title]</a>', '</dt>', '<dl class="nav3-grid">' , '</dl>');?>
your call of 'show_menu' is definitely wrong.
take a look to the definition. and do not forget the simple math.-rules about brackets.
<?php show_menu2( [$aMenu,[$aStart,[$aMaxLevel,[$aOptions,[$aItemOpen,[$aItemClose,[$aMenuOpen,[$aMenuClose,[$aTopItemOpen,[$aTopMenuOpen]]]]]]]]]] ); ?>
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?
$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
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;)
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;)
It is solved - erpe helped me. THX a lot:)
best regards
Craxx;)
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:
show_menu2(0, SM2_ROOT, SM2_CURR, SM2_CRUMB, '<span class="[class]"> » [a][menu_title]</a></span>', '', '', '', ''.$breadcrumbstart.' » <span class="[class]">[a][menu_title]</a></span>');
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">');
show_menu2(1, SM2_CURR+1, SM2_CURR+1, '', '<li class="[class]">[a][menu_title]</a></li>', '', '', '', '');
And how can I repair it?
Hi, in your third code is the 4th parameter missing.
Try SM2_TRIM
show_menu2(1, SM2_CURR+1, SM2_CURR+1, 'SM2_TRIM', '<li class="[class]">[a][menu_title]</a></li>', '', '', '', '');
Done - with aposthrophe ' xxx '?
Thank you dbs, I will have a look tomorrow on the server logfile and post it here.
Tom
Quote from: Tomno399 on July 01, 2016, 02:22:14 PM
Done - with aposthrophe ' xxx '?
without apostrophe!
Ooops, jacobi22 is right.
Without aposthropes = no more error messages!
Thank you dbs, thank you jacobi22!
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
<?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>'); ?>
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:
<?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 ;-)
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
Quotedo 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!
Quote from: Hans on February 13, 2017, 08:08:26 PM
Quotedo 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.
(Y) (Y)