Search…

X3 Photo Gallery Support Forums

Search…
 
netopir
Experienced
Topic Author
Posts: 46
Joined: 11 Nov 2014, 14:37

Error in Menu

04 Mar 2017, 08:51

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
Attachments
Imagevue error on menu.PNG
Imagevue error on menu.PNG (58.99 KiB) Viewed 2540 times
 
netopir
Experienced
Topic Author
Posts: 46
Joined: 11 Nov 2014, 14:37

Re: Error in Menu

04 Mar 2017, 09:10

After some changes in the panel the error masage disapiers. But after some time coms the error back in the menu.
 
User avatar
mjau-mjau
X3 Wizard
Posts: 14452
Joined: 30 Sep 2006, 03:37

Re: Error in Menu

04 Mar 2017, 10:43

Do you have a link for me?
 
netopir
Experienced
Topic Author
Posts: 46
Joined: 11 Nov 2014, 14:37

Re: Error in Menu

05 Mar 2017, 02:01

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 :
Attachments
Imagevue menu hide.PNG
Imagevue menu hide.PNG (17.38 KiB) Viewed 2528 times
Imagevue panel hide.PNG
Imagevue panel hide.PNG (36.89 KiB) Viewed 2528 times
 
User avatar
mjau-mjau
X3 Wizard
Posts: 14452
Joined: 30 Sep 2006, 03:37

Re: Error in Menu

05 Mar 2017, 04:08

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:
Image
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.
 
User avatar
mjau-mjau
X3 Wizard
Posts: 14452
Joined: 30 Sep 2006, 03:37

Re: Error in Menu

05 Mar 2017, 04:15

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.
 
User avatar
mjau-mjau
X3 Wizard
Posts: 14452
Joined: 30 Sep 2006, 03:37

Re: Error in Menu

05 Mar 2017, 04:36

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.
 
netopir
Experienced
Topic Author
Posts: 46
Joined: 11 Nov 2014, 14:37

Re: Error in Menu

05 Mar 2017, 04:57

OK thanx for the fast replay and i will make thes changes you tel me.

Best regrads.