Commons 7.x-3.x-dev 2012-Nov-10 installed.

Gets this error when trying to create a post

Warning : Invalid argument supplied for foreach() in entityreference_field_widget_form() (line 815 of /home/domain/public_html/dc/profiles/commons/modules/contrib/entityreference/entityreference.module ).

The mobile version doesn't works well with opera mini and uc browser (the two most widely used mobile browsers) not even with nokia ovi browser for s40. The editor doesn't works on any of them...

Comments

Matt V.’s picture

I'm seeing the same error when trying to create either Page, Post, or Wiki content. It appears twice on each page:

  • Warning: Invalid argument supplied for foreach() in entityreference_field_widget_form() (line 815 of /path/to/commons/profiles/commons/modules/contrib/entityreference/entityreference.module).
  • Warning: Invalid argument supplied for foreach() in entityreference_field_widget_form() (line 815 of /path/to/commons/profiles/commons/modules/contrib/entityreference/entityreference.module).

The error does not appear when I go to create Event or Group content. I'm running the latest 7.x-3.x-dev release, downloaded today (2012-11-09).

ezra-g’s picture

Status: Active » Closed (duplicate)

I believe this is a duplicate of #1818180: Refactor og_group_ref field definition , but feel free to re-open if you feel it's not.

Mr. Nx’s picture

Status: Closed (duplicate) » Active

I don't this this is a duplicate of the above issue. And my case is different from matt's problem in the case that he is getting the error while creating a page, post or wiki.

I can create a group without errors. Can add users and wikis too. The error is only when trying to create a post. Group functionality is so far ok. One thing to note : the options for creating post doesn't shows up in group page but under the wikis tab.

I created users and noticed that though one is able to follow a group or an event, there is no option to follow users

ezra-g’s picture

Status: Active » Postponed (maintainer needs more info)

@Mr. Nx: Do these errors go away when you click the "Create post" link from a group homepage?

Mr. Nx’s picture

Yes, the error disappears once the post is created but a new one shows up.

When i click the create post link this error shows above the new post creation field

Error message Warning : Invalid argument supplied for foreach() in entityreference_field_widget_form() (line 815 of /home/naga8399/public_html/dc/profiles/commons/modules/contrib/entityreference/entityreference.module ).

And after clicking the save post button this error shows up.
Error message
*. Warning : Invalid argument supplied for foreach() in commons_radioactivity_incident_groups() (line 65 of /home/naga8399/public_html/dc/profiles/commons/modules/contrib/commons_radioactivity/commons_radioactivity.module ).
*. Notice : Undefined variable: gids in commons_radioactivity_incident_groups() (line 69 of /home/naga8399/public_html/dc/profiles/commons/modules/contrib/commons_radioactivity/commons_radioactivity.module ).

Note: Post created appears on the featured contents list but when i go to the group in which it was created, the post is not shown up (not even under the posts tab)

Post creation link does not appear under the post tab or the wikis tab directly. To create a post i had to goto Group>Wikis>create wiki>add content>post

Mr. Nx’s picture

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

I do get the same error message. I've only had a chance to play with the latest dev for a a minute, but it did save everything, but I cannot edit the wiki page. The edit problem has been there awhile, so I'll post an issue for it.

ezra-g’s picture

Status: Active » Closed (duplicate)

Yes, the error disappears once the post is created but a new one shows up.

When i click the create post link this error shows above the new post creation field

Error message Warning : Invalid argument supplied for foreach() in entityreference_field_widget_form() (line 815 of /home/naga8399/public_html/dc/profiles/commons/modules/contrib/entityreference/entityreference.module ).

I'm unable to reproduce this error, though I believe that it happened. Ultimately such an error is likely to be a symptom of the same underlying problem for #1818180: Refactor og_group_ref field definition , so I'm marking this issue as a duplicate of that, since any fix there will involve testing the node creation workflow both with and without the groups prepopulated.

For error messages related to radioactivity, please file a new issue so we can be sure to track that one down separately.

Thanks for the early feedback on Commons - It's very much appreciated!