Did you clear MODx cache too?
http://www.google.com/search?hl=en&q=site:modxcms.com/forums+Invalid+argument+supplied+for+foreach()+&aq=f&aqi=&aql=&oq=&gs_rfai=
I continue to have this issue, as well. Shame -- the configuration this snippet allows makes it ideal. I figured out a workaround with NavSiblings, but it’s just not the same. :’(
Anybody have thoughts on why this error is being thrown? I’m on XAMPP/PHP5.3.1/MODx1.0.4.
[tt]PHP error debug
Error: Invalid argument supplied for foreach()
Error type/ Nr.: Warning - 2
File: /Applications/XAMPP/xamppfiles/htdocs/wesleypicotte/manager/includes/document.parser.class.inc.php(770) : eval()’d code
Line: 197[/tt]
-
☆ A M B ☆
- 24,524 Posts
Are you sure that there are published resources as children of the resource you specified as the startID? And they are set to show in the menu? Or if the children are themselves folders you’ve used the includefolders parameter?
-
☆ A M B ☆
- 24,524 Posts
so it only uses children that are set to show in the menu. This error is a common one in a snippet that wasn’t coded with a check for no valid values; the foreach() doesn’t like being fed an empty value.
-
☆ A M B ☆
- 24,524 Posts
Never admit that you don’t know what you’re doing! If you can fumble around and finally get something to work, then you can convince everybody that you’re a coding goddess
Show in Menu fixed it for me! thanks
www.mediagang.co.uk: Developing your business online