Skip to content
This repository has been archived by the owner on Dec 14, 2020. It is now read-only.

Invalid argument supplied for foreach() #13

Closed
manuylov opened this issue Dec 25, 2012 · 10 comments
Closed

Invalid argument supplied for foreach() #13

manuylov opened this issue Dec 25, 2012 · 10 comments

Comments

@manuylov
Copy link

Hello =)

When being in administration of Joomla 3.0 (in a Module Settings), next to "position" setup it throws me the following:

Warning: Invalid argument supplied for foreach() in /administrator/components/com_modules/views/module/tmpl/edit_positions.php on line 31

@nwrightau
Copy link

I'm getting this as well, fresh install of J3.02

@manuylov
Copy link
Author

Yeah, not on all sites... Justed hoped somebody knows where the problem is.

@nwrightau
Copy link

Do you think it's a J3 bug not a template bug?

@manuylov
Copy link
Author

Thanx for reaction. I'd say, I did something wrong. I have two sites on the same hosting, that are using Joomla 3. And just one of them has this problem.

@nwrightau
Copy link

Did you figure out how to fix it? My J3 site is on our test server with many other sites all 2.5 though.

@nwrightau
Copy link

I've found this error comes up when the module has a position that is not in templateDetails.xml

Add the position to templateDetails.xml and the error should go away (still a J3 bug though I think)

@manuylov
Copy link
Author

Thank you VERY MUCH. This is it!

@gebeer
Copy link

gebeer commented Mar 20, 2013

It seems to depend on the server environment, wheter J! throws this error or not.
On my dev server I don't get the error. Now I moved the site to the live-server and begn to get the error. But only after some time of editing modules in the backend. At the beginning everything was fine.

I'm pretty sure it started after adding a custom position that was not in the templateDetails.xml. After updateing templateDetails.xml the error is gone.

@avush96
Copy link

avush96 commented Apr 9, 2013

did not work for me: default templateDetails.xml has already this positions and still get this errors. I get it with all the modules..any idea how to fix that?

@heybyte
Copy link

heybyte commented Jun 21, 2013

@avush96 Had the same problem. Found out every template, even not used, must have at least two positions.

If not, the argument at foreach() is a string with the one position, so: php error.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants