Reviewed & tested by the community
Project:
Organic Groups Webform Integration
Version:
7.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
18 Mar 2013 at 23:07 UTC
Updated:
28 Nov 2018 at 18:42 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
bircherand here is the patch
Comment #2
jastraat commentedI'm afraid the previous patch doesn't take into account that a webform could be in multiple groups and that the entity reference field could be named something other than the default. I've attached an alternate patch that should work for more use cases.
Comment #3
Renee S commentedPatch didn't apply cleanly, but a bit of copy-pasting and #2 works great for me.
Comment #4
jastraat commentedThere were a few excess spaces in the patch, so I've attached a slight update. I just tried applying it again though, and it applied cleanly. Just to double-check, did you try to apply it against the latest dev (not the latest release)?
Comment #5
sheldonkreger commentedI don't see a dev branch for this project. But, the patch in 4 does not apply cleanly to 7.x-1.0-beta1
I will take a look at this patch and see if I can get it to apply cleanly to the current release.
Comment #6
sheldonkreger commentedJust a quick update:
Patch in 4 applies cleanly when you also include this commit "http://drupalcode.org/project/og_webform.git/commit/b60f03a"
I'm going to test the actual functionality later on today.
Comment #7
jastraat commentedI cloned the dev branch directly from git.
Comment #8
jastraat commentedComment #9
alisonPatch applied cleanly for me when I included the commit mentioned in #6. I'm running OG 7.x-2.2.
Comment #10
oranges13Patch worked for me!
Comment #11
jastraat commentedComment #12
pgillis commentedPatch works for me. Are there any plans for a new release? From my understanding OG is only supported on 2.0 now.
Comment #13
Renee S commentedI'm using this in production with OG2 and it works great. A++ would patch again. Can we get it committed? OG2 is the official release now and is bundled with things like Atrium and Commons.
Comment #14
bircherThanks to jastraat!
Indeed, I forgot to consider these cases.
I concur with Renee S.
Comment #15
anthonyroundtree commentedThe patch seems to work for me, but only with the commit from #6.
Comment #16
kunkunkun commentedDo I need to add a group reference in the webform to make this work?
Comment #17
Renee S commentedYes, you do :)
(eta: on the Webform node, that is.)
Comment #18
uzuri commentedI tried the patch (+ commit from 6) this morning with no luck, running OG 2.7. Only way I could get my lower-access user to be able to see webform results was to grant the overreaching permission to see all webform results on the entire site, regardless of group (or see only your own form's results, though that's a useless option when you've got multiple people who want a shot at the result set). Tweaking with the group-level settings for results does nothing.
We're not going to allow free webform creation on our site just yet, so I've got a bit of a workaround for the single form that's critical, but it'd be nice to have this working.
Edit: I was wrong -- it works! Managed to overlook one little checkbox on my test user.
Comment #19
joshuautley commentedI can confirm the latest dev + #6 patch works. Note that if you use the latest dev release you do not need patch#4 as its included.
Running Drupal 7.34 and OG 7.x-2.7
Comment #20
ladew222 commentedI attempted patch #6 with OG 7.x-2.7 to no avail. I have given the test user permissions to access all webform data through the group permission page but they do not see the results tab unless I grant them global permissions to view webform results. Do I need to include #4 or is there another config option I missing...
Comment #21
oranges13From comment #6:
You need to apply both the patch in #4 and the code you applied in #6
Comment #22
ladew222 commentedOk thanks..
Comment #23
ladew222 commentedI checked and both were applied. I will paste the relevant sections of og_webform.module. I also joshuautley suggested used the latest dev version. Could that be a problem?
Implements hook_webform_submission_access().
*
* @see webform_submission_access()
*/
function og_webform_webform_submission_access($node, $submission, $op = 'view', $account = NULL) {
global $user;
$account = isset($account) ? $account : $user;
// Ensure a full node object, as Views handlers may not load the entire node.
if (empty($node->vid) && !empty($node->nid)) {
$node = node_load($node->nid);
}
// Ensure a full node object, as Views handlers may not load the entire node
if (empty($node->vid) && !empty($node->nid)) {
$node = node_load($node->nid);
}
// If this webform is not in a group, don't affect access.
if (empty($node->group_audience['und'])) {
return;
}
Comment #24
ladew222 commentedI am looking into my problem. Oranges13 I believe is right as I do not think patch #4 is included.
Comment #25
ladew222 commentedThanks Oranges13, the stable release and the two patches worked.
Comment #26
btmash commentedCan confirm that patch #4 with the dev release applies cleanly.
Comment #27
oriol_e9gI can also confirm that patch #4 + patch #6 + OG-2.7 Works.
Attaching the patched module for easy use/test.
Comment #28
zeip commentedThe patch in #4 worked for me, thanks! Maybe this could finally be committed and released as a new version? Escalating the issue to priority Major, since this renders the module useless for users of new OG and the OG version restriction isn't mentioned on the module page.
Comment #29
abu-zakham commentedI can also confirm that patch #4 + patch #6 + OG-2.8 Works.
Comment #30
anewholm commentedthanks!
Comment #31
robcarrJust re-rolled the patch for OG2 against the current Beta1 release. Seems to work with OG2.9. Thanks to jastraat and sheldonkreger for the code.
Comment #32
carlovdb commented#27 did the job for me!!
Comment #33
jeffm2001 commentedTo clarify, for others like me who were confused reading this thread, what you need is 7.x-1.x-dev + the patch in #4.
It would be nice if the patch was committed, but seeing as it's almost 5 years old at this point, it probably never will be.
Comment #34
cortlandd commented#31 resolves the issue for version: 7.x-1.0-beta1