I am getting this error:
Invalid argument supplied for foreach() in /home/diatribu/public_html/modules/mysite/plugins/layouts/default.php on line 27.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | mysite_3.patch | 1.56 KB | agentrickard |
I am getting this error:
Invalid argument supplied for foreach() in /home/diatribu/public_html/modules/mysite/plugins/layouts/default.php on line 27.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | mysite_3.patch | 1.56 KB | agentrickard |
Comments
Comment #1
mounte commentedCould you specify the bug a little bit more?
When does this occur?
Did mysite work before for you ...
Comment #2
agentrickardMuch more information needed. In particular:
- Whose MySite page is being viewed (the page Owner)?
- By whom (the User)?
- What permissions do each user have?
- Does the user have any content in their MySite collection?
There are checks that should prevent this from happening, so we need to isolate the configuration that causes this error.
Comment #3
agentrickardComment #4
agentrickardThis seems to be a duplicate of http://drupal.org/node/144187. Please make sure you are running the latest release (5.x.2.1).
Comment #5
kforet commenteduploaded latest version on 07/07/07. Was getting error when authenticated user without content accessed module. I added content to default site and that fixed that problem. Now I get it only when anonymous user clicks MySite tab.
Comment #6
agentrickardI thought this was solved. See http://drupal.org/node/144187.
There must be something going on with regard to permissions and content.
Investigating.
Comment #7
agentrickardOK, I tracked this down, and here's the cause.
If you navigate to "Default Settings" or "Default Content" a MySite record for user zero (0) is created.
If you then do not add any default content to that account, the error occurs because the function
theme_mysite_create_help()andtheme_mysite_anonymous_help()both assume that data will be returned but it is not.Fix is to wrap the output call in an IF check in both functions.
The attached patch fixes the problem, as does adding default content.
Committed to HEAD.
Comment #8
agentrickardthanks kforet. The anon user tip was the missing piece.
Thanks also to Zahor. http://drupal.org/node/157164
Comment #9
agentrickardI'd like to get a few more bugs fixed before rolling a new release.
Particularly http://drupal.org/node/155879.
For now either apply the patch or configure default content.
Comment #10
agentrickardPatch is http://drupal.org/files/issues/mysite_3.patch
Comment #11
(not verified) commented