error in webforms: 'Missing argument 3 for webform_associate_menu_access'

tekad - January 13, 2009 - 17:13
Project:Webform Associate
Version:6.x-1.0-beta2
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:needs work
Description

This module is throwing errors on all webforms. I tried to install the module and immediately started seeing the following error repeated over and over above the form. I tried to create a new webform and the same thing is happening.

warning: Missing argument 3 for webform_associate_menu_access() in /var/www/vhosts/officefurniturelocators.com/httpdocs/sites/all/modules/webform_associate/webform_associate.module on line 48.

Drupal 6.8
Webform 6.x-2.4
Webform Associate 6.x-1.0-beta2

#1

EclipseGc - January 13, 2009 - 21:56

there are general issues with webform 2.4 as I understand it. stick with 2.3 right now, and let me know if the errors persist. I'll take a look at it shortly if so.

#2

tekad - February 9, 2009 - 19:06

Downgrading to webforms 6.x-2.3 did remove the errors. I am just hoping that downgraded properly.

#3

rhubarb-media - February 17, 2009 - 14:55

Any idea when this will be fixed? I just upgraded to Webform 6.x-2.6 and I'm getting errors. I'm going to downgrade back to 6.x-2.3.

Thanks.

#4

allanx - March 3, 2009 - 16:41
Category:bug report» support request

Any news on a fix for this issue...?

Same message here:

warning: Missing argument 3 for webform_associate_menu_access() in /home/example/public_html/new/sites/all/modules/webform_associate/webform_associate.module on line 48.

This is line 48 in that ,module file:

function webform_associate_menu_access($func, $arguments = array(), $node, $a3 = NULL) {

Anyone got answers?

Love to use this module for my clients...

Drupal 6.2
Webform Associate 6.x-1.0-beta2

cheers
allanx

#5

GreyHawk - March 5, 2009 - 15:56

Nevermind -- just tested and looked at the full code; $a3 is a valid value. I have not idea.

This is impacting a site I just set up where Ubercart requires webform associate, and also a site that a friend set up.

The line that you print looks a little off to me -- I wonder if the missing argument 3 is $a(3), which would make the line look like this:

  function webform_associate_menu_access($func, $arguments = array(), $node, $a(3) = NULL) {

I've not done any Drupal development and am not sure if the possible "fix" would be just to find and replace the original line with the one above, but from my ancient programming background the $a(3) would be the "missing" argument 3.

#6

allanx - March 6, 2009 - 05:19

Thanks GreyHawk,

Tried your suggestion but:

Parse error: syntax error, unexpected '(', expecting ')' in /home/erisj/public_html/new/sites/all/modules/webform_associate/webform_associate.module on line 48

Poo!

#7

doublethink - March 6, 2009 - 14:38

Argument 3 is the $node argument. I just added = NULL to the $node argument, in line 48 in webform_associate.module.
Seems working well so far!

function webform_associate_menu_access($func, $arguments = array(), $node = NULL, $a3 = NULL) {

#8

GreyHawk - March 7, 2009 - 02:33

Thanks, doublethink -- that just might be it. :)

#9

allanx - March 7, 2009 - 09:03

Cool and thanks for the efforts of all...!

So, am I right in assuming that this will fix the error message, and make the associate module work? Did it work for you GreyHawk?

allanx

#10

design.er - March 7, 2009 - 13:26
Status:active» fixed

I tested it and it works absolutely fine!
Thanks a lot. You guys rock! :)
I think we can sign this as fixed.

#11

GreyHawk - March 8, 2009 - 06:55

AllanX -- testing it in the morning, but suspect that it will work beautifully...the results so far look like they've all been positive, so I'm pretty confident going in. :)

I'll let you know for sure once I've tested. ;)

#12

allanx - March 9, 2009 - 04:19

I've edited the code and this has fixed the error. Thanks.

#13

alanburke - March 13, 2009 - 11:41
Status:fixed» reviewed & tested by the community

Hi all
[I'm in the process of reviewing this module]
The issue would appear to need a fix in the code, that your guys have found.

However it shouldn't be marked as 'fixed' until the maintainer adds that code to the CVS repo.

It is then marked as fixed by the maintainer.

Great work guys!

Alan
PS I know there's no patch... but it's pretty close.

#14

Summit - March 19, 2009 - 14:05

Subscribing, greetings, Martijn

#15

adandos - April 7, 2009 - 21:22

don't think that is the correct solution...

Webforms will receive content and see if it has any related forms to load up. You're telling it that content is null aren't you ???

here's what i did...

http://drupal.org/node/426818

#16

jdwfly - May 1, 2009 - 20:48

That fix from #7 does eliminate the error. I tried it on the recent dev version.

Although I am having trouble looking at the submissions... I get an access denied for my webform submissions. I might end up posting an issue about it.

#17

twirlingsky - May 28, 2009 - 19:30

subscribing

#18

anawillem - June 1, 2009 - 18:05
Status:reviewed & tested by the community» fixed

just speaking to EclipseGc - who was so kind and rigorous and awsome. if ever you see him on #drupal or anywhere else, you should bow to him with reverence as you would to a holy man. He gave the following code:

http://drupalbin.com/9676

this works using the .dev modules for both webform_associate and uc_webform_productize.

THANKS EclipseGc!

#19

jdwfly - June 2, 2009 - 00:17
Status:fixed» needs review

We shouldn't marked fixed until the code maintainer adds this to the recent dev version.

#20

joachim - July 21, 2009 - 12:59
Title:Enabling the module immediately results in all errors on all webforms.» error in webforms: 'Missing argument 3 for webform_associate_menu_access'
Category:support request» bug report
Status:needs review» needs work

Just changing the issue title to something more specific -- I nearly filed a duplicate :)

And I don't think this fix is correct:
$node = menu_get_object('webform_associate_webform');

The above line causes the 'Configuration Form components' subtabs to disappear -- I just see the default subtab, so in effect I can't add form components.

#21

superduperdan - July 23, 2009 - 16:06

#7 works for me just like everyone esle BUT, when i go to the "Form components" edit page of the associated node I get the follow error:

warning: Invalid argument supplied for foreach() in /home/kitsap/public_html/home/sites/all/modules/webform/webform_components.inc on line 31.

Any ideas on how to correct this? Thanks

#22

jdwfly - July 24, 2009 - 16:09

Sorry guys, I'd help you out but I decided against using this module. There were too many bugs that just aren't getting fixed.

#23

EclipseGc - August 6, 2009 - 15:31

So the fundamental problem here is that webform wasn't meant to be abused like this. It COULD be tweaked to work (ultimately) but I think we have a better solution. Check out #510256: Allow webforms on any content type and get on the band wagon there. This will get the functionality of webform_associate directly into webform 3.x It's already working better than webform_associate is.

Eclipse

#24

jdwfly - August 7, 2009 - 19:17

I don't believe I was abusing this module, but rather just trying to use it normally. If you are really abandoning this module you might want to put an update on the project page stating that you are no longer fixing bugs in lieu of your other implementation.

I glanced at your other issue and it sounds like a good implementation. I'll have to actually check out how well it works.

#25

flyingyoda51 - August 18, 2009 - 18:20

Good to see that maybe there is a solution on the horizon. Is there a solution available now???

#26

tborrome - September 7, 2009 - 04:10

same issue...

#27

xstatic - October 26, 2009 - 20:13

Ok, so we are in the last week of October 2009... any word on this module being fixed?
The only remedy offered is to degrade to Webforms 2.3, well they are now at 2.8 so if this module is not compatible with Webforms, it simply doesn't work at all, right?

And the blurb about "abusing" the module... really? How do you abuse a module? If it works, you use it... I fail to see how it's possible to "abuse" a module.

Looks like this module is abandoned by the author and as it was said by jdwfly, you may want to put some sort of announcement to that affect...

#28

vindesh - October 29, 2009 - 11:27

In function webform_associate_menu_access() put "$node=NULL" Then problem will be resolve.
I have try this and my problem resolved.

Try this :)

function webform_associate_menu_access($func, $arguments = array(), $node=NULL, $a3 = NULL)

Regard's
Vindesh Lowanshi

#29

vindesh - October 29, 2009 - 11:32

In function webform_associate_menu_access() put "$node=NULL" Then problem will be resolve.
I have try this and my problem resolved.

Try this :) put

$node=NULL

in function webform_associate_menu_access

function webform_associate_menu_access($func, $arguments = array(), $node=NULL, $a3 = NULL)

Regard's
Vindesh Mohariya

#30

doublethink - October 29, 2009 - 19:11

See #7

 
 

Drupal is a registered trademark of Dries Buytaert.