OK, I've created a paid event node, but I don't see a webform tag, and when I look at the node content, $node->webform isn't there. I'm using Webform 6.x-3.5 .

Comments

Rob_Feature’s picture

Status: Active » Closed (fixed)

Note the "requirements" section in the readme. A minimum of webform 3.6 is required because what you're seeing is a bug in 3.5. Update webform and you may have to reinstall this module.

julia_g’s picture

Sorry, missed this. But I've updated Webform, removed the module and paidevent type and reinstalled it. Still the same thing. Is there anything else I need to clean up? I have the latest version of Ubercart.

andyf’s picture

Having the same problem. I have webform 3.6 and no joy. I've tried on a minimal testbed site and had no problems, but on the site I'm building at the moment (which is a bit of a module hog I'm afraid) there's no webform tab appearing, and no webforms created upon creation of a paid event. Will look into it further.

andyf’s picture

Fixed by uninstalling and reinstalling webform. Dunno why. Order of events:

  1. installed webform 3.4
  2. updated webform to 3.6
  3. installed uc_event_registration (not working properly)
  4. uninstalled and reinstalled webofrm (now works)

hth someone

heyyo’s picture

I have the same bug with webform already installed(several successive updates). Any idea on how to reinstall webform 3.6 module without loosing existing webforms ?

andyf’s picture

You could try exporting them with Node export.

heyyo’s picture

I finally just export/import all tables beginning with webform_, it made it :-)

drubage’s picture

I installed this onto a new Drupal install today and it seems to be working.

I installed it onto another Drupal install tonight (a live site with 15,000+ users) and the webform tab is not there. This 2nd site is using:

Webform 6.x-3.6
Ubercart 6.x-2.4

Any ideas?

drubage’s picture

More details, I found this line in webform in webform_node_insert:

if (!in_array($node->type, webform_variable_get('webform_node_types'))) {
return;
}

Sure enough, the variable webform_node_types did not have paidevent. I added it and now I see the webform tab after adding a node. BUT, I also got this error :(

* Warning: array_filter() expects parameter 1 to be array, null given in webform_node_insert() (line 892 of /home/dev3golf/public_html/sites/all/modules/contrib/webform/webform.module).
* Warning: Invalid argument supplied for foreach() in webform_node_insert() (line 892 of /home/dev3golf/public_html/sites/all/modules/contrib/webform/webform.module).

Should there be some roles values set in uc_event_registration_nodeapi for $node->webform['components']?

andyf’s picture

I'm no expert with webform, but the code around line 892 inserts values into table webform_roles. That looks to be the roles that can submit the webform (visible by visiting node/%/webform/configure). So you could try adding your webform's nid and any role id manually to that table, and hopefully the node load would pick up that value and work properly.

Rob_Feature’s picture

Status: Closed (fixed) » Closed (works as designed)

This sounds like an issue somewhere with the webform module on everyone's particular site. The webform tab is added by webform module, not this module...therefore marking as "works as designed" since it's not really part of this module's functionality.

juanbond’s picture

Had the same problem with the webform tab not showing with

Webform 6.x-3.9
Ubercart 6.x-2.4

Maybe I'm misunderstanding the "closed (works as designed)" status, but don't you need that tab to add additional web form fields to the Event content type? What was the proper solution, uninstalling and reinstalling webform? Any advice would be helpful.

juanbond’s picture

Sorry, figured it out. Didn't realize I still had to go into webform settings and select Paid Event content type for it to show the tab.

andyf’s picture

Sounds to me like this is a bug - paidevent should already be configured as a webform type. Note also a similar problem described in #9. I don't know strongarm and features very well unfortunately. Looking at lines 46-55 in uc_event_registration_feature.strongarm.inc I can see where the variable's set up. Here's one possible explanation that would fit the symptoms given:

  • The variable webform_node_types isn't actually created until visiting the webform config page and saving.
  • If you immediately install uc_event_registration after webform, strongarm is happy to set up the variable webform_node_types because it doesn't exist yet.
  • If you've been using webform for a while before installing uc_event_registration, chances are that you've visited the webform config page and saved the settings (and therefore created webform_node_types). Then when you install uc_event_registration strongarm doesn't want to clobber the variable, and paid_event isn't set up appropriately.

This would explain why uninstalling and reinstalling webform 'fixed' the problem. If it is the case, then a bit of code in the install function should solve it I think.

andyf’s picture

Status: Closed (works as designed) » Active

Oops, forgot to change the status.

Rob_Feature’s picture

Excellent diagnosis AndyF. Probably need to do some testing to see if this happens regularly to make sure it's the issue. Can people please confirm that this behavior sounds like what they're seeing?

stewest’s picture

Version: 6.x-1.0-beta5 » 6.x-1.0

Hi, I have the same problem - but really like the module... (also which attributes will work soon!) ;-)

So, I have required modules and versions installed. Have been using webform for a while. When I install uc_event_registration, no webform tab appears, and if I check the webform settings, Paid Event is not ticked. If I do tick it, the webform tab appears, but the fileds (payment status and quantity obviously don't show, as the table wasn't updated when the module was installed)

Not sure how to uninstall and re-install uc_event_reg properly... now.

I also don't want to loose all my webforms by installing webform module and re-installing it (mention having been made of a fix was to do this).

Should I try dev version?

Rob_Feature’s picture

After reading #17 over again, this sounds like a classic case of the feature being in an 'overridden' state. To fix it, you should be able to navigate into the uc_event_registration feature and it'll indicate "overridden". You want to "revert" the feature and it should remedy this.

Give that a try (on a dev site :) and let me know if that fixes it.

tms8707056’s picture

I am also having this problem using Webform 6.x-3.9 and UC Event Registration 6.x-1.1. I have read through this thread but haven't found anything that works. My uc_event_registration feature is not overridden in the Strongarm settings. Any suggestions?

Rob_Feature’s picture

To fix this you should just be able to go into the webform settings and manually choose 'paid event' as a webform type. We probably just need to write an update function in the module to make sure it's on.

Please test by going into webform settings (/admin/settings/webform i think) and check paid event. Let me know if that fixes it...if so I'll write an update hook.

juliaset’s picture

#18 didn't work for me...after reverting, features still indicates it's overridden.

I'm able to manually choose 'paid event' in webform settings, but this doesn't resolve the two custom fields being automatically added to the webform. They are not, in my case. Without them, the resulting form refuses to submit because of lack of quantity specification. I don't mind manually adding them if I knew what they should be named and the form field type...?

juliaset’s picture

After manually enabling 'paid event' as a webform, I ended up uninstalling both the uc_event_registration as well as the corresponding feature module and re-installing both, which resolved the issue for me. The paid event content type now automatically appears with the two custom fields.

andyf’s picture

@juliaset Hi, did you uninstall Webform as well?

drupalsteve’s picture

I experienced the same problem. I followed the instructions in #20, and it is now working.

juliaset’s picture

@AndyF nope, I didn't need to.

andyf’s picture

Status: Active » Fixed

Should be fixed in dev.

Rob_Feature’s picture

Nice, thanks AndyF. Feel free to roll this into an official release once tested.

andyf’s picture

Will look to test and roll this weekend.

Status: Fixed » Closed (fixed)

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

juliaset’s picture

@AndyF -- Nope, I didn't have to.

ratinakage’s picture

Hi all,

You seem to be talking about Webform 3.6 but when I go to the Webform module page it only has 3.11.

See: http://drupal.org/project/webform

Any ideas??

Thanks....

andyf’s picture

When the issue was first reported the latest release was 3.6 - things have moved on since then. This issue should be fixed now anyway.

ratinakage’s picture

Oh. Yes thanks. I got confused between 6.11 and 6.1.1. Doh! :)

Never mind...

andyf’s picture

Ahhh, right, with you! Yeah, it does kinda go against years of basic maths!