Just did a fresh install of the latest Commons 7 dev (dated Jan 10) and got this when I went to create a new Post:
Warning: Invalid argument supplied for foreach() in og_field_widget_form() (line 69 of /home/clients/websites/w_comm7/public_html/comm7/profiles/commons/modules/contrib/og/includes/og.field.inc).
Warning: Invalid argument supplied for foreach() in entityreference_field_widget_form() (line 815 of /home/clients/websites/w_comm7/public_html/comm7/profiles/commons/modules/contrib/entityreference/entityreference.module).
Warning: Invalid argument supplied for foreach() in entityreference_field_widget_form() (line 815 of /home/clients/websites/w_comm7/public_html/comm7/profiles/commons/modules/contrib/entityreference/entityreference.module).
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | no_group_node_add_fix.patch | 527 bytes | mmilano |
Comments
Comment #1
jlea9378 commentedOn creation of the Post I got two more warning/notices:
Warning: Invalid argument supplied for foreach() in commons_radioactivity_incident_groups() (line 140 of /home/clients/websites/w_comm7/public_html/comm7/profiles/commons/modules/contrib/commons_radioactivity/commons_radioactivity.module).
Notice: Undefined variable: gids in commons_radioactivity_incident_groups() (line 144 of /home/clients/websites/w_comm7/public_html/comm7/profiles/commons/modules/contrib/commons_radioactivity/commons_radioactivity.module).
Comment #2
jlea9378 commentedIt looks like some of the errors were already reported: #1837308: Error (unable) in creating New posts
But I'm confused about if there is a fix or not. It is marked as a duplicate of another issue which I am not clear as to whether or not there is a fix for it. The referenced issue is confusing with all of the duplicate references and stuff on it.
As previously mentioned I'm using the latest dev release on a clean install: Commons (commons-7.x-3.0-beta1+14-dev)
Comment #3
Topcheese commented@jlea9378, yes it is kind of confusing. I followed the links and it looks like there is a new patch for OG groups. The patch might still need to be reviewed, but I didn't see the new patch after the last patch failed automated testing, so we might have to wait for a release.
Comment #4
jlea9378 commentedohh it is the patch on here you are referring to I think: #1845050: reference field set to "Autocomplete (Tags style)" not returning any matches
Thanks.
Comment #5
jlea9378 commentedI tried to apply the patch but it said "Reversed (or previously applied) patch detected!". So does the Jan10th dev release already include this patch?
Comment #6
Topcheese commentedYeah, sorry about that. I had checked the link again and it said "fixed," and not "needs review." It looks like the patch was applied to Organic Groups 7.x-2.x on Jan 03, so Commons Jan 10 should have it.
Comment #7
jlea9378 commentedAnyone know how to get rid of these errors?
Comment #8
mmilano commentedThere are 2 elements to this:
1) The og widget isn't testing for if there are actually targets, and running a foreach on a variable that is not an array. I posted a patch over there for that: #1895270: Error when creating content outside of a group.
2) After submitting content without a group associated, commons_radioactivity does something similar. (Even after the patch above is applied)
Attached is a patch for commons_radioactivity that add a test for the array before it runs the foreach.
Comment #9
mmilano commentedUpdating title to reflect the issue.
Comment #10
ezra-g commentedWe actually do:
But this should be a check of
as in the patch in #8.
Marking "needs work" so we can have a single check for this code. This would likely be resolved in the larger, longer term cleanup effort by #1804888: Commons_radioactivity.module contains group-specific functionality.
Comment #11
matt v. commentedFor what it's worth, I'm unable to recreate the issue on a newly built Commons site, based on the latest dev release. I was able to add new test posts to the site without any errors, both with and without Groups assigned to the posts.
Comment #12
jlea9378 commentedI get an error when I try to download the latest commons. Looks like there is already an open issue for that though.
Comment #13
Topcheese commented@jlea9378, is that using Drush? I just downloaded TTW today.
Comment #14
jlea9378 commentedNo, the link on the project page for dev tar.gz file. It didn't work yesterday but now it is working.
Comment #15
ezra-g commentedPlease re-open if you're able to reproduce with the latest nightly dev snapshot.
Comment #17
Honestly Illustrated commentedSee #16 of #1953242: Getting error while posting new questions...
I've swapped issue version because 7.x-3.2 is where I'm seeing this issue, and date on that is 2013-Apr-04 compared to February 3, 2013 for #15 comment here.
Comment #18
ezra-g commentedIssues are marked fixed when they are fixed in the codebase, not when the fix is released. This fix will be included in the 7.x-3.3 release of Commons, due out this June.
I suggest taking a few moments to read about conventions forusing the issue queue to help you get the most value from it.
Comment #19
Honestly Illustrated commentedThanks, ezra.
I wouldn't know whether it takes one month or four to take a bug fix from codebase to release, when there has been a release one month after fix in codebase. I do know what "fixed" means here, though: a fix exists.