Breaks Webform
EclipseGc - September 30, 2008 - 22:49
| Project: | Webform Associate |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | EclipseGc |
| Status: | needs review |
Description
Currently webform associate breaks webform itself. Should be fixable, probably somewhere in the big form alter stuff that's going on. Just needs to check if we're currently on a webform node and if that webform node doesn't have an associated node, then node do the form alter work.

#1
I'm using the last version of webform and webform_associate and I'm not experiencing any problem at all...
#2
Might be some of the new code I WAS running. My next patch will fix this again.
#3
Newest code SHOULD fix this.
It needs testing w/ and w/o the uc_webform_productize module installed, however I believe it continues to work both ways. Checkout from CVS if you can't wait till the next dev tar gets produced. 4hrs still new tar is created.
#4
Still breaks Webform by the looks of it.
Running Drupal 6.6, just installed Webform 6.x-2.3 and Webform Associate 6.x-1.x-dev.
Spent the past 4 hours trying to figure out how to create a webform as it kept coming up with "You are not authorized to access this page.", wasn't until I disabled Webform Associate that I could get Webform to work.
Sorry, still a newbie so not much else I can tell you.
#5
I get the same message: "You are not authorized to access this page"
Any hints as to fix? Is there a permission or role to add somewhere?
cheers,
allanx
#6
I found that as soon as you choose a content type for webform associate it fixes the webform.
It looks like the "webform_associate_nodes" variable needs to be created.
The problem appears to be in the function:
function webform_associate_menu_access($func, $arguments = array(), $node = NULL, $a3 = NULL) {$vars = variable_get('webform_associate_nodes', array());
foreach ($vars as $var) {
if ($node->type == $var || $node->type == 'webform') {
switch ($func) {
case 'node_access':
return $func($arguments[0], $node->nid);
break;
case 'user_access':
return $func($arguments[0]);
break;
case 'webform_submission_access':
if (!$a3) {
return $func($node->nid, '', $arguments[2]);
}
else {
return $func($node->nid, $a3, $arguments[2]);
}
break;
}
}
else {
return FALSE;
}
}
}
If there is not any webform_associate_nodes then the function returns false and does not give access.
#7
Nice sleuthing in 6. I think this patch ought to clean that up,
#8
Thanks, shaisachs, for your work. Unfortunately, I can't seem to get it working. I applied both patches that you have submitted (this one and the one over here), but I'm still getting an "access denied, You are not authorized to access this page." error.
Any help would be much appreciated. Just in case I did do something dumb, I'm attaching the .module file for you to look at, if you are so inclined ;-).
Thanks again.
#9
When are you seeing that error? Have you checked to make sure that permissions are assigned correctly for webform?
#10
I see the error any time I try to access a webform. I'm still able to associate a webform with a node, but I cannot see the webform information, or any webfom-related tabs, when I view the node. If I try to actually look at the webform, though, I do get that error.
I working on this module on a local instance using the acquia stack installer, and I only have the two default roles: anonymous and authenticated. I have given full privileges to the authenticated user.