The following is found in the error.log:
[30-Jun-2020 15:09:17 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/bring2mi/public_html/wp-content/plugins/advanced-sidebar-menu-pro/src/Nav_Menu/Objects.php on line 254
[30-Jun-2020 15:09:17 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/bring2mi/public_html/wp-content/plugins/advanced-sidebar-menu-pro/src/Nav_Menu/Objects.php on line 192
[30-Jun-2020 16:02:40 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/bring2mi/public_html/wp-content/plugins/advanced-sidebar-menu-pro/src/Nav_Menu/Objects.php on line 254
[30-Jun-2020 16:02:40 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/bring2mi/public_html/wp-content/plugins/advanced-sidebar-menu-pro/src/Nav_Menu/Objects.php on line 192
[30-Jun-2020 16:15:34 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/bring2mi/public_html/wp-content/plugins/advanced-sidebar-menu-pro/src/Nav_Menu/Objects.php on line 254
[30-Jun-2020 16:15:34 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/bring2mi/public_html/wp-content/plugins/advanced-sidebar-menu-pro/src/Nav_Menu/Objects.php on line 192
I tried to enable debug and error message display, but then the menu would not show at all, just the error messages on the webpage.
View the page.
The left sidebar menu has been configured in a widget, which is added to the page. It looks nice, but gives me errors and sometimes “page not found”.
Can You help me ?
Rgds/Gunnar
OnPoint Plugins
Good Morning Gunner,
Thank you for bringing the error to our attention. While not particularly harmful, it is still a warning which may clutter logs. I have updated the code to account for this warning which will be available along with the next release.
As far as the “page not found” issue, it appears you have a page in your menu titled “Multinational All-Terrain Vehicle (MATV)” which does not have a working permalink. Here are a few possibilities to why it may not be working:
Hope this helps locate the issue!
Have a great day!
Gunnar Snellman
Hi Mat, thank you for the quick response. By the way, is there a way for the plugin “Advanced Sidebar Menu” to ignore displaying pages in DRAFT mode. I.e. only to display published pages the user has the right to view depending on role access ? The menus are based upon the WordPress menu management code in backend and I do not know if this is to difficult to achieve.
Rgds/Gunnar
OnPoint Plugins
Good Morning Gunner,
The pages menu automatically excludes drafts, while the navigation menu will display whatever you put in there.
While there is not a mechanism built directly into this plugin to exclude drafts when using custom menus, this may be accomplished by tapping into the WordPress core functionality using a filter. Adding the following filter to your active theme’s functions.php file will automatically exclude draft pages from any menus created using the WordPress menu manager:
Have a great day!