Webform 7.x-3.9
Eloqua Integration 7.x-1.0

I am trying to enable the eloqua integration for my webform but it does not save the configuration.
In edit mode of the webform in the Eloqua Integration Options I am checking the Enabled box and entering my form name and submit.

I get these errors and if I return to the edit mode the options are not saved.
Notice: Trying to get property of non-object in eloqua_form_webform_node_form_alter() (line 187 of /sites/all/modules/contrib/eloqua/eloqua.module).
Notice: Trying to get property of non-object in eloqua_form_webform_node_form_alter() (line 193 of /sites/all/modules/contrib/eloqua/eloqua.module).
Notice: Trying to get property of non-object in eloqua_form_webform_node_form_alter() (line 199 of /sites/all/modules/contrib/eloqua/eloqua.module).
Notice: Trying to get property of non-object in eloqua_form_webform_node_form_alter() (line 199 of /sites/all/modules/contrib/eloqua/eloqua.module).

Comments

CKoch’s picture

StatusFileSize
new2.41 KB

Here's a patch that will solve those issues with a change the webform module.

Also, you should apply the patch at: http://drupal.org/node/1088074 to fix a cron issue.

anthonylbest’s picture

I am struggling to figure out how to apply this patch would it be possible for you to simply upload a new version of this module with the patch applied?

Thanks.

ultimike’s picture

StatusFileSize
new2.42 KB

@CKoch - I think you missed a single character in your patch that causes the PHP notices ("Trying to get property of non-object in eloqua_form_webform_node_form_alter()") to still appear.

In the function signature for your _eloqua_form_webform_node_form_alter_default_settings() function, you forgot to pass the $settings variable in by reference.

Instead of:

function _eloqua_form_webform_node_form_alter_default_settings($settings) {

it should be

function _eloqua_form_webform_node_form_alter_default_settings(&$settings) {

I've updated your patch and attached it below.

Thanks,
-mike

drupalninja99’s picture

StatusFileSize
new2.88 KB
new1.5 KB

This looks good, I just don't think we need an extra function call so I moved the new code into the form alter.

drupalninja99’s picture

Status: Active » Reviewed & tested by the community
Issue tags: +RTBC

I think this is ready to go, we just need a 6x port.

drupalninja99’s picture

StatusFileSize
new1.12 KB
new2.52 KB

Forgot to remove the function, re-rolling.

drupalninja99’s picture

StatusFileSize
new2.21 KB

Forgot to merge in my change from 7.x-1.x.

drupalninja99’s picture

Attaching D6 patch

drupalninja99’s picture

Issue tags: -RTBC

Pushed to 6.x-1.x and 7.x-1.x

drupalninja99’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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