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

Offline Craxx

  • Posts: 239
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;)
Craxx;)

Offline Argos

  • Posts: 2542
  • Gender: Male
    • Argos Media
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/
Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
----------------------------------------------------------------
Please don't request personal support, use the forums!

Offline Craxx

  • Posts: 239
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:
Only registered users can see contents. Please click here to Register or Login.

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

Offline Argos

  • Posts: 2542
  • Gender: Male
    • Argos Media
You have 2 menu calls:

Code:
Only registered users can see contents. Please click here to Register or Login.
Code:
Only registered users can see contents. Please click here to Register or Login.
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:
Only registered users can see contents. Please click here to Register or Login.
to see what menu is wrong.
Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
----------------------------------------------------------------
Please don't request personal support, use the forums!

Offline Craxx

  • Posts: 239
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 »
Craxx;)

Offline BerndJM

  • Posts: 1764
  • Gender: Male
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
In theory, there is no difference between theory and practice. But, in practice, there is.

Offline Craxx

  • Posts: 239
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 »
Craxx;)

Offline Argos

  • Posts: 2542
  • Gender: Male
    • Argos Media
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.
Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
----------------------------------------------------------------
Please don't request personal support, use the forums!

Offline DarkViper

  • Core Development
  • *****
  • Posts: 2897
  • Gender: Female
Code:
Only registered users can see contents. Please click here to Register or Login.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:
Only registered users can see contents. Please click here to Register or Login.
« Last Edit: May 04, 2010, 10:24:15 PM by DarkViper »
Der blaue Planet - er ist nicht unser Eigentum - wir haben ihn nur von unseren Nachkommen geliehen

"You have to take the men as they are ... but you can not leave them like that !!" :-P
Ein einziger Buchstabendreher kann einen ganzen Satz urinieren.

Offline BerndJM

  • Posts: 1764
  • Gender: Male
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:
Only registered users can see contents. Please click here to Register or Login.You have the HTML-Syntax for $aItemOpen as $aOptions ...

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

Offline Craxx

  • Posts: 239
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;)
Craxx;)

Offline Craxx

  • Posts: 239
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;)
Craxx;)

Offline Craxx

  • Posts: 239
It is solved - erpe helped me. THX a lot:)

best regards
Craxx;)
Craxx;)

Offline Tomno399

  • Posts: 211
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:
Only registered users can see contents. Please click here to Register or Login.
Code:
Only registered users can see contents. Please click here to Register or Login.
Code:
Only registered users can see contents. Please click here to Register or Login.
And how can I repair it?



Offline dbs

  • Betatester
  • **
  • Posts: 6980
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Hi, in your third code is the 4th parameter missing.
Try SM2_TRIM
Code:
Only registered users can see contents. Please click here to Register or Login.

Offline Tomno399

  • Posts: 211
Done - with aposthrophe ' xxx '?

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

Tom

Offline jacobi22

  • Global Moderator
  • *****
  • Posts: 4678
  • Gender: Male
    • Jacobi22
Done - with aposthrophe ' xxx '?

without apostrophe!
Es bist immer nur Du, auch wenn du mich vergisst, es gibt niemanden, der mir näher ist
Immer nur du, die mich wach hält
(*miss you*)

Offline dbs

  • Betatester
  • **
  • Posts: 6980
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Ooops, jacobi22 is right.

Offline Tomno399

  • Posts: 211
Without aposthropes = no more error messages!

Thank you dbs, thank you jacobi22!

Offline deriesindi

  • Posts: 2
  • Gender: Male
    • rumahseminimalis
Re: show_menu2 error: $aOptions is invalid. No flags from group 1 supplied!
« Reply #19 on: August 03, 2016, 06:05:04 AM »
ok, Hy Argos,

thx for answer and tipp. On bothe there loker 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.

Offline jacobi22

  • Global Moderator
  • *****
  • Posts: 4678
  • Gender: Male
    • Jacobi22
Re: show_menu2 error: $aOptions is invalid. No flags from group 1 supplied!
« Reply #20 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:
Only registered users can see contents. Please click here to Register or Login.
« Last Edit: August 03, 2016, 11:57:24 AM by jacobi22 »
Es bist immer nur Du, auch wenn du mich vergisst, es gibt niemanden, der mir näher ist
Immer nur du, die mich wach hält
(*miss you*)

Offline Hans

  • Posts: 908
  • Gender: Male
Re: show_menu2 error: $aOptions is invalid. No flags from group 1 supplied!
« Reply #21 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:
Only registered users can see contents. Please click here to Register or Login.
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 ;-)
Hans - Nijmegen - The Netherlands

Offline jacobi22

  • Global Moderator
  • *****
  • Posts: 4678
  • Gender: Male
    • Jacobi22
Re: show_menu2 error: $aOptions is invalid. No flags from group 1 supplied!
« Reply #22 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
Es bist immer nur Du, auch wenn du mich vergisst, es gibt niemanden, der mir näher ist
Immer nur du, die mich wach hält
(*miss you*)

Offline Hans

  • Posts: 908
  • Gender: Male
Re: show_menu2 error: $aOptions is invalid. No flags from group 1 supplied!
« Reply #23 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!
Hans - Nijmegen - The Netherlands

Offline Hans

  • Posts: 908
  • Gender: Male
Re: show_menu2 error: $aOptions is invalid. No flags from group 1 supplied!
« Reply #24 on: February 13, 2017, 08:15:44 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.
Hans - Nijmegen - The Netherlands

 

postern-length