I am getting this error:
Invalid argument supplied for foreach() in /home/diatribu/public_html/modules/mysite/plugins/layouts/default.php on line 27.

CommentFileSizeAuthor
#7 mysite_3.patch1.56 KBagentrickard

Comments

mounte’s picture

Could you specify the bug a little bit more?
When does this occur?
Did mysite work before for you ...

agentrickard’s picture

Much 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.

agentrickard’s picture

Status: Active » Postponed (maintainer needs more info)
agentrickard’s picture

Status: Postponed (maintainer needs more info) » Closed (duplicate)

This seems to be a duplicate of http://drupal.org/node/144187. Please make sure you are running the latest release (5.x.2.1).

kforet’s picture

uploaded 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.

agentrickard’s picture

Status: Closed (duplicate) » Active

I thought this was solved. See http://drupal.org/node/144187.

There must be something going on with regard to permissions and content.

Investigating.

agentrickard’s picture

StatusFileSize
new1.56 KB

OK, 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() and theme_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.

agentrickard’s picture

Status: Active » Reviewed & tested by the community

thanks kforet. The anon user tip was the missing piece.

Thanks also to Zahor. http://drupal.org/node/157164

agentrickard’s picture

Version: 5.x-2.1 » 5.x-2.3
Component: - Layout plugin » Code

I'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.

agentrickard’s picture

Status: Reviewed & tested by the community » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)