I'm trying to get Visitor path working with the webform module but having no luck.

I've upgraded webform to 6.x-3.2 and have the 6.x-1.0 of Visitor path.

When I try to enable visitor path for a webform node I get a WSOD and about 50 entries written to the apache error log

I've spent a while looking at the code and docs and seems that maybe webform 6.x-3.2 has been changed such that it breaks compatibility with modules that previously depended on it ?

Does anyone know whether or not this is infact the case with Visitor path and if so is anyone likely to be working an update / fix for Visitor path in the near future ?

CommentFileSizeAuthor
#6 rename-function-907884-6.patch705 bytesshawngo

Comments

simg’s picture

Status: Active » Needs review

Cool, I think I've fixed this myself ... albeit in a slightly "hacky" way ...

Problem seems to be with the function visitorpath_webform_component_insert() on line 481.

Version 6.x-3.2 of webform now treats this as a hook and gets stuck in a recursive loop.

My fix is to change the name of the function on line 481 to

function visitorpath_webform_component_insert_nohook()

and update line 281 to

visitorpath_webform_component_insert_nohook($nid, $key);

not the prettiest fix, but it works :)

Andy21’s picture

I have found that fixes in lines 298 and 466 instead of 281 and 481.

shawngo’s picture

I ran across the same issue. Can this be rolled into a new version that supports Webform 3.x ?

suffering drupal’s picture

Would you say it is better to work with webform 6.x-3.2 and an unpretty fix, or would 6.x-2.x be good enough? Any advantages for 3.x? I think I'd prefer to use an earlier version without fixes.

Webster619’s picture

I think I'm having the same issue, but couldn't get any of the solutions mentioned so far to work.

I'm running 6.x-1.0 on Drupal 6.22 with Webform 3.12

When I try to enable visitor path on a webform the site hangs and then goes WSOD on the node edit URL.

When I then go to the home page I get the following errors:

warning: Missing argument 2 for visitorpath_webform_component_insert() in /home/dev.rtsfueladvantage.com/public_html/sites/all/modules/visitorpath/visitorpath.module on line 466.
warning: mysql_real_escape_string() expects parameter 1 to be string, array given in /home/dev.rtsfueladvantage.com/public_html/includes/database.mysql.inc on line 329.
user warning: Duplicate entry '5-12' for key 'PRIMARY' query: INSERT INTO webform_component (nid, cid, pid, form_key, name, type, value, extra, mandatory, weight) VALUES (5, 12, 0, 'visitorpath_source', 'source', 'hidden', '', '', 0, 0) in /home/dev.rtsfueladvantage.com/public_html/sites/all/modules/webform/includes/webform.components.inc on line 708.
warning: Missing argument 2 for visitorpath_webform_component_insert() in /home/dev.rtsfueladvantage.com/public_html/sites/all/modules/visitorpath/visitorpath.module on line 466.
warning: mysql_real_escape_string() expects parameter 1 to be string, array given in /home/dev.rtsfueladvantage.com/public_html/includes/database.mysql.inc on line 329.
user warning: Duplicate entry '1-13' for key 'PRIMARY' query: INSERT INTO webform_component (nid, cid, pid, form_key, name, type, value, extra, mandatory, weight) VALUES (1, 13, 0, 'visitorpath_', '', 'hidden', '', '', 0, 0) in /home/dev.rtsfueladvantage.com/public_html/sites/all/modules/webform/includes/webform.components.inc on line 708.
warning: Missing argument 2 for visitorpath_webform_component_insert() in /home/dev.rtsfueladvantage.com/public_html/sites/all/modules/visitorpath/visitorpath.module on line 466.
warning: mysql_real_escape_string() expects parameter 1 to be string, array given in /home/dev.rtsfueladvantage.com/public_html/includes/database.mysql.inc on line 329.

These errors keep going on, but I just pasted this much.

After that, I go back to the webform edit screen and visitor path is not checked.

Any ideas?

Thanks.

shawngo’s picture

StatusFileSize
new705 bytes

Here's a quick patch to rename the visitorpath_webform_component_insert function to work with Webform 3.x.

mlncn’s picture

Thanks shawngo, simg! Fixed in commit 389237d and will now roll a new release.

mlncn’s picture

Status: Needs review » Fixed

Released 6.x-1.1 with the patch applied.

[Note: As i'm not currently using this module myself, would certainly welcome a co-maintainer.]

shawngo’s picture

Hi mlncn -

Thanks for the update.

I'm interested in co-maintaining - would you like a formal post in the issue queue?

mlncn’s picture

Hi Shawn! You are a co-maintainer now!

Still waiting on the release made to actually work in creating a tarball, report to infrastructure team of the problem here: #1381030: Git project packaging error failed with status 2 "This does not look like a tar archive"

shawngo’s picture

Thanks Benjamin!

Status: Fixed » Closed (fixed)

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