BrilliantPlugins / salesforce-wordpress-to-lead

github home of http://wordpress.org/extend/plugins/salesforce-wordpress-to-lead/
16 stars 25 forks source link

Error message on "Success" page after form submission #84

Closed Lynda1952 closed 6 years ago

Lynda1952 commented 6 years ago

I recently installed the plugin on a client's WordPress site. They've been using SalesForce for years, and on their old site (before my time), they had a "leads" page where their staff or board members could input baic lead info for Salesforce, that would be followed up later.

Our Salesforce support guy suggested we install the plugin and re-create the leads page, which I did, at http://www.createnow.org/leads, then ran a test. Everything went well - the lead went into Salesforce, the acknowledgement email went to the WP admin's email address, and the Success page loaded. But on that page, above the word "Success!!", was the following error message:

Notice: Undefined variable: form_type in /home/hx57i3f4f0a1/public_html/wp-content/plugins/salesforce-wordpress-to-lead/salesforce.php on line 805

Is this something I can correct in the PHP code, or a bug on Brilliant's end? I'm an old-school HTML/CSS coder who can get around okay in WordPress and edit PHP with guidance, but I have no idea how this Git thing works! Hope someone with newbie patience can give me a hand here. :)

GrimsGramS commented 6 years ago

Hey, same Problem here. I fixed it for me. I think there has been a refactoring of some functions and forgot setting some default values (form_type, layout and donotautoaddcolontolabels).

@Lynda1952 I attached the two changed files.

CHANGES (salesforce.php):

CHANGES (lib/salesforce_admin.class.php):

changes-fixes_sf_wp-to-lead_84.zip

Hope it helps.

nciske commented 6 years ago

A few things to note:

  1. That's just a notice, it doesn't affect functionality at all.
  2. You should have error displayed disabled on a production server.
  3. This will be addressed in a future update.
Lynda1952 commented 6 years ago

Thank you, @GrimsGramS, I will work with these tomorrow or Wednesday and let you know how it worked.. I assume this means I have to edit the PHP files directly rather than making a correction in the plug-in's settings.

@nciske, I'm sorry, but I don't know how (or where) to disable error displayed, and not sure what you mean by "production server." Like I said - newbie. soft smile