I have been having lots of success adding pages using different templates, and adding them to the main menu, and everything has been working until I added third-level menu items. That is when I get the famous multiple warnings.
Here's is an example of the menu structure working, with no bug or warnings:
-
Main menu item
-
main menu secondary item
-
main menu secondary item
-
main menu secondary item
-
main menu secondary item
-
main menu secondary item
-
main menu secondary item
-
When I add a third level to the menu, I run into problem, and I get a bug (sidebar-bug.png, attached):
-
Main menu item
-
main menu secondary item
-
main menu secondary item
-
main menu secondary item
-
main menu secondary item
-
main menu secondary item
-
-
main menu secondary item
-
main menu secondary item
-
main menu secondary item
-
main menu secondary item
-
main menu secondary item
-
To try to solve this, I went configured the menu block to change the main menu Starting level from secondary to tertiary. This makes the menu display properly, but I then get all the warnings.
Hope you can help, thanks.
Hi,
At the moment, sidebar menu only supports one level. If you would like to use multi-level menu, please take a look at module https://www.drupal.org/project/nice_menus.
You need to create your new own menu (do not use main menu any more) in Structure > Menu. For example: we will name menu as "Sidebar menu" then use above module to configure sidebar menu to have multi level as you would like.
Ah ok, Will give it a try, thanks. To be clear I only want one level of links in the sidebar. For example, if I have the following menu:
Shape
Circle
Sun
Moon
Square
Rectangle
Triangle
Colour
Size
If I'm on page 'Circle', I only want to see the following (in the sidebar):
Circle
Square
Rectangle
Triangle
In other words, I don't need to see any nav child items in the sidebar. Do I still need to use the other module?
thanks again
You could try to create customised static block then add HTML as below:
<ul class="menu">
<li><a href="aboutus-basic.html">ABOUT US - BASIC</a></li>
<li class="active"><a href="aboutus.html">ABOUT US</a></li>
<li><a href="certifications.html">CERTIFICATIONS</a></li>
<li><a href="history.html">COMPANY HISTORY</a></li>
<li><a href="core-values.html">OUR CORE VALUES</a></li>
</ul>
By this way, you can insert, remove menu items without using other modules, also module nice_menu as we suggested above.
Static menus would be a huge job for a big website. I'd have to make maybe 100 different menus.
I'm just getting used to your theme and awecontent, trying to integrate a new module at this point might get confusing for me
I'll give it a try though.
I disabled menu block, and installed Nice_Menu. Already I have multiple warning on admin pages.
Questions:
Should the menu parent of Nice menu be the machine name of the sidebar menu I just created in Administration » Structure » Menus? The default is set to <navigation>
How do I add links to the new sidebar menu I created?
Please take a look at tutorial: https://www.youtube.com/watch?v=H4kEfxM6dfo
So the first step is to disable the menu_block module, right? All I have done is disable the menu_block, and right away I get the famous warnings that I have seen so many times with this theme:
Warning: Invalid argument supplied for foreach() in element_children() (line 6541 of /home3/montreb2/public_html/d7/includes/common.inc).
Warning: Illegal string offset '#children' in drupal_render() (line 5998 of /home3/montreb2/public_html/d7/includes/common.inc).
Warning: Illegal string offset '#children' in drupal_render() (line 6008 of /home3/montreb2/public_html/d7/includes/common.inc).
Warning: Illegal string offset '#children' in drupal_render() (line 6046 of /home3/montreb2/public_html/d7/includes/common.inc).
Warning: Illegal string offset '#printed' in drupal_render() (line 6053 of /home3/montreb2/public_html/d7/includes/common.inc).
etc...
Why do these warnings show so often in this theme? Is there a way to actually know what the error is, instead of the same warnings each time?
Sorry,
Which version of module field collection are you using in your site?
7.x-1.0-beta11
So please downgrade to version beta 8 (https://www.drupal.org/node/2369003).
I downgraded the field collection module to beta 8.
But I still get common.inc warnings when I disable the menu block module.
So please try without disabling menu block module.
I want to use nice menu module, so I have to disable the menu block module.
Everything I want to do in this theme I get the common.inc errors, this is completely ridiculous...
I re-enabled the menu block, and created a new page, and AGAIN with these warnings:
Warning: Invalid argument supplied for foreach() in element_children() (line 6541 of /home3/montreb2/public_html/d7/includes/common.inc).
Warning: Illegal string offset '#children' in drupal_render() (line 5998 of /home3/montreb2/public_html/d7/includes/common.inc).
Warning: Illegal string offset '#children' in drupal_render() (line 6008 of /home3/montreb2/public_html/d7/includes/common.inc).
Warning: Illegal string offset '#children' in drupal_render() (line 6046 of /home3/montreb2/public_html/d7/includes/common.inc).
Warning: Illegal string offset '#printed' in drupal_render() (line 6053 of /home3/montreb2/public_html/d7/includes/common.inc).
Warning: Invalid argument supplied for foreach() in element_children() (line 6541 of /home3/montreb2/public_html/d7/includes/common.inc).
Warning: Illegal string offset '#children' in drupal_render() (line 5998 of /home3/montreb2/public_html/d7/includes/common.inc).
Warning: Illegal string offset '#children' in drupal_render() (line 6008 of /home3/montreb2/public_html/d7/includes/common.inc).
Warning: Illegal string offset '#children' in drupal_render() (line 6046 of /home3/montreb2/public_html/d7/includes/common.inc).
Warning: Illegal string offset '#printed' in drupal_render() (line 6053 of /home3/montreb2/public_html/d7/includes/common.inc).
ETC
We fixed. Please check site.
Thank you very much. What was causing the warnings?
Please take note that we just need to remove menu block from page then it works normally. Also, we think we had an explanation for you at another topic in forum already.
Oh, do you mean this explanation? Thanks.
Yes, that's it!
That is the least helpful you could possibly be.
Is the idea that if there are no child pages, then the sidebar menu should be removed?
Mattypants,
It is the one we mentioned.
I'm trying hard to understand most of your answers. Would the answer to my previous question be yes or no?
thanks
Our answer is yes.
Thank you.
Ok, I understand, thanks