Page 1 of 1
Error in Menu
Posted: 04 Mar 2017, 08:51
by netopir
Hello
After update to version X3 v0.22.2 becom in the menu an error:
Warning: Invalid argument supplied for foreach() in /home/mojeslik/www/app/helpers.inc.php on line 112
Re: Error in Menu
Posted: 04 Mar 2017, 09:10
by netopir
After some changes in the panel the error masage disapiers. But after some time coms the error back in the menu.
Re: Error in Menu
Posted: 04 Mar 2017, 10:43
by mjau-mjau
Do you have a link for me?
Re: Error in Menu
Posted: 05 Mar 2017, 02:01
by netopir
Hi isend you the data over PM.
I fond another thing in the setings i have disebled folders in menu both he still shows on it see pictures :
Re: Error in Menu
Posted: 05 Mar 2017, 04:08
by mjau-mjau
netopir wrote:I fond another thing in the setings i have disebled folders in menu both he still shows on it see pictures :
That's because you have "Simple Menu" enabled.

Simple menu should only be enabled if you have a very heavy website, and don't need to apply specific menu settings.
Simple Menu Mode
Simple menu mode will drastically speed up the creation time of your menu. Because of the limitations, this setting is normally unsuitable, but if you have thousands of pages and/or are hosted on a very slow server, it could be a beneficial compromise.
Why so fast?
In simple mode, the menu is created by simply reading the directory structure of your content. Instead of having to load page data for each menu item, it simply creates menu items based on folder names.
Limitations
Simple menu mode has several limitations:
- Does not support mega menu.
- Uses folder name instead of label from page settings.
- Does not support special menu settings like links.
* Use this setting if you plan on having thousands of pages and don't require advanced menu behavior. This setting may be especially useful for the sidebar layout.
Just for your information, having all three settings checked does not serve any purpose:

Already the first checkbox will hide the menu item, so it makes no sense to also hide child menu items. These features don't work when "simple menu" is enabled.
Re: Error in Menu
Posted: 05 Mar 2017, 04:15
by mjau-mjau
netopir wrote:After some changes in the panel the error masage disapiers. But after some time coms the error back in the menu.
I am still trying find out why this happens, but I can tell you how it can be avoided: Every time you SAVE anything in the panel, make sure the first page you visit is NOT the home page. For example, make sure to visit
http://www.mojeslike.eu/contact/ after making changed in the panel. This will make sure the main MENU cache element does not include "warnings". After it's created, the menu will display fine for the home page also.
Re: Error in Menu
Posted: 05 Mar 2017, 04:36
by mjau-mjau
I tried everything (using PHP 7.1.0), and could not reproduce the "warning" you are getting. It is just a "warning" and not an "error", and definitely related to the fact that your server is set to report "ALL warnings", instead of only errors. The "warning" itself is harmless.
You will need to either follow the process noted in my previous post, to avoid the "warning" output in the menu, or disable error_reporting=all on your server.
Re: Error in Menu
Posted: 05 Mar 2017, 04:57
by netopir
OK thanx for the fast replay and i will make thes changes you tel me.
Best regrads.