From http://drupal.org/node/1902086#comment-7078416:

We need to find a scalable way, to allow it to work on every widget type.
I had an idea that we can also use ER-prepopualte, and letting the widget add groups passed via url, that user has access to. Like this we don't need to iterate over each group. The problem is what to do with node edit...

Patch Er_prepopulate with #1944618: Allow getting values without validation

CommentFileSizeAuthor
#3 1943834-og-create-3.patch3.18 KBamitaibu
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

amitaibu’s picture

Work is done in branch 1943834

amitaibu’s picture

amitaibu’s picture

Status: Active » Needs review
FileSize
3.18 KB

When testing make sure to patch ER-prepopulate as-well.

amitaibu’s picture

Status: Needs review » Fixed

Committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

David4514’s picture

Segment Fault on adding OG content after this patch applied

I'm leaving on a trip in a few hours so my investigation must wait. After updating OG to 7.x-2.x today (dev version) I started getting segment faults when attempting to add new og content. I have chased it down to the above patch, but not to what in the patch is causing the problem. Since I have not yet chased this down to the point that I know that I'm not the cause of the problem, I chose not to yet set the status back to needs work. The only error I have found so far in the logs is the segment fault.

Ubuntu - PHP: 5.3.6-13ubuntu3.9

[EDIT] This appears to be an infinite recursive loop in OgSelectionHandler.class.php. Function getGidsForCreate line 189:
if (!$ids = entityreference_prepopulate_get_values($this->field, $this->instance, TRUE, FALSE))
causes function buildEntityFieldQuery to be driven which invokes getGidsForCreate a couple of times each invoking buildEntityFieldQuery.... until the segment fault.

Sorry... but I really must leave now!

[Edit] I have returned... I cannot find any problem with my setup. I have created a new issue to track this #1966818: Segmentation Fault after Commit aa258c1 (Issue 1943834) when adding OG content

David4514’s picture

Issue summary: View changes

Updated issue summary.