sendgrid / wordpress

SendGrid plugin for WordPress

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Incompatible with Forms from Huge-IT

sgehrman opened this issue · comments

I'm getting this in my log. The form works fine without sendgrid, if I add sendgrid plugin I get this...

// if you use this, it's broken
https://wordpress.org/plugins/forms-contact/

[Tue Apr 05 05:38:57.938858 2016] [:error] [pid 32296] [client 67.180.193.24:34775] PHP Fatal error: Cannot redeclare set_html_content_type() (previously declared in /nas/content/live/vrrockstars/wp-content/plugins/sendgrid-email-delivery-simplified/lib/sendgrid/sendgrid-wp-mail.php:362) in /nas/content/live/vrrockstars/wp-content/plugins/forms-contact/hugeit_contact_function/huge_it_contact_form_validation.php on line 318, referer: http://www.vrrockstars.com/contact-us/

We're looking into this. Thank you for reporting it.

Hi.

We have tested this issue with the latest version of the SendGrid Plugin and the latest version of HugeIT Forms plugin and we were unable to reproduce it.

However, we believe this has to do with the order in which the Wordpress plugins are loaded by your Wordpress installation.

As you can see here : https://github.com/sendgrid/wordpress/blob/master/lib/sendgrid/sendgrid-wp-mail.php#L394
We check if the function exists before declaring it, if it does not, we declare it. The HugeIT Forms plugin version that you have installed might declare the function without checking if it exists first.

We cannot change the name of this function since it would affect backwards compatibility of our plugin.

If you still experience this issue with the version of HugeIT Forms that you have installed please contact them on their Support page. They should be able to change their plugin easily to check for the existence of this function prior to declaring it which will solve your error.