• Resolved Theorem_US

    (@theorem_us)


    Hi, I got a PHP error back when I submit a form linked to Hubspot. I’m using the API key to link to Hubspot. Here is the error:

    Warning: Missing argument 4 for GFFeedAddOn::add_feed_error(), called in /home/webstage/public_html/wp-content/plugins/gravityforms-hubspot/library/class.gf-hubspot.php on line 118 and defined in /home/webstage/public_html/wp-content/plugins/gravityforms/includes/addon/class-gf-feed-addon.php on line 1201

    Fatal error: Cannot use object of type stdClass as array in /home/webstage/public_html/wp-content/plugins/gravityforms/gravityforms.php on line 3164

    Any Ideas on what is causing this?

    https://ww.wp.xz.cn/plugins/gravityforms-hubspot/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Chris Lagasse

    (@soben)

    Looking into this now.

    Quick check shows that you’re missing a required field. This shouldn’t be error-ing out, which I’ll work on a fix right now.

    But in the short term (next hour?) the issue is that you have a field empty that’s required.

    Plugin Author Chris Lagasse

    (@soben)

    Version 2.0.3 was just released and fixes that error message.

    However, technically it doesn’t solve your larger problem: Whoever submitted that form is missing a field that’s required by HubSpot (check your Feed Settings to see what’s required, and make Gravity Forms field have the same “required” restriction).

    If that error gets hit, the form won’t be sent to HubSpot, because it’s missing data and knows that HubSpot would return with a failure as well.

    Hope that helps πŸ™‚

    Thread Starter Theorem_US

    (@theorem_us)

    Oh I see! Ok well I got both of those field to display again, and when I submitted the form it brought me to the contact page where it said:

    Thanks for contacting us! We will get in touch with you shortly.

    but then it also displayed this error on the top of the page

    Unable to submit form: exception ‘HubSpot_Exception’ with message ‘cURL error: error setting certificate verify locations: CAfile: /etc/pki/tls/certs/ca-bundle.crt CApath: none’ in /home/webstage/public_html/wp-content/plugins/gravityforms-hubspot/library/hubspot/class.baseclient.php:272 Stack trace: #0 /home/webstage/public_html/wp-content/plugins/gravityforms-hubspot/library/hubspot/class.forms.php(44): HubSpot_BaseClient->execute_post_request(‘https://forms.h…’, ‘&firstname=Ron&…’, true) #1 /home/webstage/public_html/wp-content/plugins/gravityforms-hubspot/library/class.gf-hubspot.php(139): HubSpot_Forms->submit_form(‘401373′, ’03dd7493-9b7b-4…’, Array, Array) #2 /home/webstage/public_html/wp-content/plugins/gravityforms/includes/addon/class-gf-feed-addon.php(212): GF_HubSpot->process_feed(Array, Array, Array) #3 [internal function]: GFFeedAddOn->maybe_process_feed(Array, Array) #4 /home/webstage/public_html/wp-includes/plugin.php(213): call_user_func_array(Array, Array) #5 /home/webstage/public_html/wp-content/plugins/gravityforms/gravityforms.php(3244): apply_filters(‘gform_entry_pos…’, Array, Array, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) #6 /home/webstage/public_html/wp-content/plugins/gravityforms/form_display.php(1127): gf_apply_filters(‘gform_entry_pos…’, 2, Array, Array) #7 /home/webstage/public_html/wp-content/plugins/gravityforms/form_display.php(126): GFFormDisplay::handle_submission(Array, Array, false) #8 /home/webstage/public_html/wp-content/plugins/gravityforms/gravityforms.php(309): GFFormDisplay::process_form(2) #9 [internal function]: GFForms::maybe_process_form(Object(WP)) #10 /home/webstage/public_html/wp-includes/plugin.php(579): call_user_func_array(Array, Array) #11 /home/webstage/public_html/wp-includes/class-wp.php(633): do_action_ref_array(‘wp’, Array) #12 /home/webstage/public_html/wp-includes/functions.php(886): WP->main(”) #13 /home/webstage/public_html/wp-blog-header.php(14): wp() #14 /home/webstage/public_html/index.php(17): require(‘/home/webstage/…’) #15 {main}

    Plugin Author Chris Lagasse

    (@soben)

    This is due to SSL certificate issues on your server.

    I have never been able to replicate this issue on multiple computers and servers (we use this plugin on my local install for testing, but also with 4-5 different clients on 2-3 different servers)…

    It _appears_ to be an issue due to your server’s configuration is different than the default for the certificate bundle that it looks at to verify that the connection is secure.

    http://curl.haxx.se/mail/curlphp-2005-11/0038.html

    The only thing I can really do on my end is remove my SSL checks, but that makes my plugin a tad more unsecure.

    I would consider consulting with your server provider at this point.

    My only solution that I can offer on my end is that you could go edit a dozen lines in one of my files to not check the SSL certificate that’s being returned from HubSpot, but this would require you to edit my plugin’s core, which would prevent you from being able to update my plugin in the future.

    I will continue digging into this in a long term solution, though, just to make sure I cover all of the bases I can πŸ™‚

    Plugin Author Chris Lagasse

    (@soben)

    Hey Theorem,

    I decided to try something on my end that has been mentioned as a solution to the problem. I’d rather not include this bundle, but if it solves your problem, then great.

    This is on a different branch (not public yet), so download this version of the plugin, install it, and give it a shot.

    https://dl.dropboxusercontent.com/u/4749689/gravityforms-hubspot-2.0.4.tar.gz

    If you can’t open .tar files, or you’re unsure what to do, I’ll zip it up instead.

    Thread Starter Theorem_US

    (@theorem_us)

    I’ve reached out to our Server team for some thoughts, but if you could zip that and send it over that would be a super helpful “if all else fails” plan.
    Thank you!

    Plugin Author Chris Lagasse

    (@soben)

    Ok, that old link no longer works, as I removed it from my dropbox.

    https://dl.dropboxusercontent.com/u/4749689/gravityforms-hubspot-2.0.4.zip

    If this works for you, I’ll get this into the next release πŸ™‚

    Let me know what your server team tells you too, because it’d be good insight into this issue.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘PHP Error When submitting form’ is closed to new replies.