We are using Contact7 integration to push data from one site to a backend Civi site. Currently running Civi 5.73.3. We recently noticed that records were not getting pushed successfully, though I’m not certain at what point it broke down.
I traced the issue to how the json params are passed to the REST API. They are passed with slashes, which means the json_decode call in CRM_Utils_REST::buildParamList() fails and consequently the API call fails. I implemented a temporary fix by running stripslashes on the raw json params before decoding. But I’m thinking the fix should really come from the integration plugin — we need to strip slashes before passing the json params to the REST API call.
]]>This plugin seems to have stopped working fairly recently, not sure exactly when though, sorry.
I see the following error in the Apache error log:
[Sat Apr 29 14:24:27.876127 2023] [proxy_fcgi:error] [pid 32446:tid 139769989076736] [remote 2a00:23c4:80aa:9901:d497:1dc1:a4a7:f3b8:56446] AH01071: Got error ‘PHP message: PHP Warning: Undefined array key 1 in /home/alicemcveigh/domains/warleighhallpress.com/public_html/wp-content/plugins/contact-form-7-civicrm-integration/contact-form-7-civi.php on line 60’, referer: https://www.warleighhallpress.com/
CF7 accepts the form submission happily, displays an acknowledgement and emails the result. CiviCRM does nothing (and nothing in error log).
CiviCRM 5.60.0 running on WordPress 6.2, PHP 8.0.28, all fully updated.
Happy to give admin access to the site if that helps.
]]>I keep getting this error when saving and validating my CiviCRM settings in the plugin. Can anyone give me a clue about what I might be doing wrong?! Thanks!
]]>I’m trying to get the plug-in working with a WordPress site hosted by Bluehost https://eatest.org.uk/ and a CiviCRM instance hosted by Spark https://eatest.civicrm.org/
I’ve managed to create an API key in CiviCRM but the plug-in settings screen on Bluehost hosted instance of WordPress displays the error Validation failed: Unable to parse returned JSON when I try to save the settings. I suspect I’ve got the CiviPath (/sites/all/modules/civicrm/extern/rest.ph) wrong and I’ve reached out the admin for that service for info. Would anyone have any other suggestions about what I’ve done wrong in setting up the integration plug-in? Many thanks, Patrick
]]>Dear,
the CiviCRM Integration works for many month with no issues. Global settings are still good, validation successfull.
With WP 5.8.2 and Contact Form 7 Version 5.5.3 and Contact Form 7 CiviCRM integration version 1.8 the “enable CiviCRM processing” is disbled and i am not able to save the CiviCRM settings on the form settings.
I filled out the form with “entity” and “action” and hit save. The site reloads, and the “enable CiviCRM processing” is disabled again, no information have been saved. Any hints for that behaviour?
]]>Hello,
I tried to create a basic connection with contact form, but this time I wanted to get their connects to activity. At the bottom you jave .json file about automation I wanted to make.
CiviCRM connection is verified with the Contact Form 7 CiviCRM integration. I have tested basic getting email only for newsletter purposes and it works as intended.
When I tested contact from listed bellow it doesn’t parse anything in database.
When I tested via curl or post request, it worked. When tested in form processor for tryout it worked.
When I try to fill out contact form on the website, it is not parsed into the database. Access logs in apache2 indeed have data when I grepped rest.php but there is not activity created in the CiviCRM.
Will provide any necessary tests, checks or information.
Contact form 7 bellow:
<label> Name and surname (required)
[text * your-name] </label>
<label> Your email (required)
[email * your-email] </label>
[hidden email customemail "[email protected]"]
<label> The subject of the message
[text your-subject] </label>
<label> Your message
[textarea your-message] </label>
[submit "Submit"]
Configuration file for Form processor:
{
"name": "contact_test_2",
"title": "contact_test_2",
"is_active": "1",
"description": "",
"output_handler": "OutputAllActionOutput",
"output_handler_configuration": [],
"enable_default_data": "0",
"default_data_output_configuration": [],
"permission": "",
"inputs": [
{
"title": "customemail",
"name": "customemail",
"type": "String",
"is_required": "0",
"default_value": "[email protected]",
"configuration": [],
"validators": []
},
{
"title": "your-email",
"name": "your_email",
"type": "String",
"is_required": "1",
"default_value": "",
"configuration": [],
"validators": [
{
"validator": "email",
"configuration": []
}
]
},
{
"title": "your-message",
"name": "your_message",
"type": "Text",
"is_required": "0",
"default_value": "",
"configuration": [],
"validators": []
},
{
"title": "your-name",
"name": "your_name",
"type": "String",
"is_required": "1",
"default_value": "",
"configuration": [],
"validators": []
},
{
"title": "your-subject",
"name": "your_subject",
"type": "String",
"is_required": "0",
"default_value": "Email iz kontakt forme",
"configuration": [],
"validators": []
}
],
"actions": [
{
"name": "xcm_contact",
"title": "XCM_contact",
"type": "XcmGetOrCreate",
"configuration": {
"contact_type": "Individual",
"xcm_profile": "Profile_overide"
},
"mapping": {
"first_name": "input.your_name",
"email": "input.your_email",
"last_name": ""
},
"condition_configuration": "",
"delay_configuration": ""
},
{
"name": "customemail_xcm",
"title": "customemail_xcm",
"type": "XcmGetOrCreate",
"configuration": {
"contact_type": "Individual",
"xcm_profile": "Profile_overide"
},
"mapping": {
"email": "input.customemail"
},
"condition_configuration": "",
"delay_configuration": ""
},
{
"name": "kreriraj_aktivnost",
"title": "kreriraj aktivnost",
"type": "CreateActivity",
"configuration": {
"priority": "Normal",
"activity_type": "Phone Call",
"activity_status": "Scheduled"
},
"mapping": {
"source_contact_id": "action.xcm_contact.contact_id",
"target_contact_id": "action.xcm_contact.contact_id",
"assignee_contact_id": "action.customemail_xcm.contact_id",
"details": "input.your_message",
"subject": "input.your_subject",
"case_id": ""
},
"condition_configuration": "",
"delay_configuration": ""
},
{
"name": "dodaj_u_kontakt_grupu",
"title": "dodaj u kontakt grupu",
"type": "AddToGroup",
"configuration": {
"group_id": "62"
},
"mapping": {
"contact_id": "action.xcm_contact.contact_id"
},
"condition_configuration": "",
"delay_configuration": ""
}
],
"default_data_inputs": [],
"default_data_actions": [],
"uploaded_source_file": "1"
}
Thanks in advance,
Nikola
After setting up a new form with “Enable CiviCRM processing” activated, I couldn’t disable it anymore. I figured out that even for another new form with no tick in that checkbox it seems to be enabled as soon as I click on “Save” for the first time. After saving it is suddenly enabled in the CiviCRM tab with all the fields (Entity, Action, Additional parameters) filled in with the defaults.
After some investigation I found out that even for a new form where the Enable checkbox is deactivated, its actual value is set to 1:
<label for=”enable-civicrm”><input type=”checkbox” id=”enable-civicrm” name=”enable-civicrm” class=”toggle-form-table” value=”1″> Enable CIVICRM processing</label>
When clicking on “Save” the POST request contains the data of the hidden fields for CiviCRM processing (see the end of the listing). The complete POST request is:
_wpnonce "5e54363c1c"
_wp_http_referer "/wp-admin/admin.php?page=wpcf7-new"
post_ID "-1"
wpcf7-locale "de_DE"
action "save"
active-tab "4"
post_title ""
wpcf7-form "<label>+Dein+Name\r\n++++[text*+your-name]+</label>\r\n\r\n<label>+Deine+E-Mail-Adresse\r\n++++[email*+your-email]+</label>\r\n\r\n<label>+Betreff\r\n++++[text*+your-subject]+</label>\r\n\r\n<label>+Deine+Nachricht+(optional)\r\n++++[textarea+your-message]+</label>\r\n\r\n[submit+\"Senden\"]"
wpcf7-mail[recipient] "[_site_admin_email]"
wpcf7-mail[sender] "[_site_title]+<[email protected]>"
wpcf7-mail[subject] "[_site_title]+?[your-subject]“"
wpcf7-mail[additional_headers] "Reply-To:+[your-email]"
wpcf7-mail[body] "Von:+[your-name]+<[your-email]>\r\nBetreff:+[your-subject]\r\n\r\nNachrichtentext:\r\n[your-message]\r\n\r\n--+\r\nDiese+E-Mail+wurde+von+einem+Kontaktformular+von+[_site_title]+([_site_url])+gesendet"
wpcf7-mail[attachments] ""
wpcf7-mail-2[recipient] "[your-email]"
wpcf7-mail-2[sender] "[_site_title]+<[email protected]>"
wpcf7-mail-2[subject] "[_site_title]+?[your-subject]“"
wpcf7-mail-2[additional_headers] "Reply-To:+[_site_admin_email]"
wpcf7-mail-2[body] "Nachrichtentext:\r\n[your-message]\r\n\r\n--+\r\nDiese+E-Mail+wurde+von+einem+Kontaktformular+von+[_site_title]+([_site_url])+gesendet"
wpcf7-mail-2[attachments] ""
wpcf7-messages[mail_sent_ok] "Vielen+Dank+für+deine+Nachricht.+Sie+wurde+gesendet."
wpcf7-messages[mail_sent_ng] "Beim+Versuch,+deine+Nachricht+zu+senden,+ist+ein+Fehler+aufgetreten.+Bitte+versuche+es+sp?ter+nochmal."
wpcf7-messages[validation_error] "Ein+oder+mehrere+Felder+weisen+einen+Fehler+auf.+Bitte+überprüfe+das+und+versuche+es+erneut."
wpcf7-messages[spam] "Beim+Versuch,+deine+Nachricht+zu+senden,+ist+ein+Fehler+aufgetreten.+Bitte+versuche+es+sp?ter+nochmal."
wpcf7-messages[accept_terms] "Du+musst+die+Bedingungen+und+Konditionen+akzeptieren,+bevor+du+deine+Nachricht+senden+kannst."
wpcf7-messages[invalid_required] "Dies+ist+ein+Pflichtfeld."
wpcf7-messages[invalid_too_long] "Deine+Eingabe+ist+zu+lang."
wpcf7-messages[invalid_too_short] "Deine+Eingabe+ist+zu+kurz."
wpcf7-messages[upload_failed] "Beim+Hochladen+der+Datei+ist+ein+unbekannter+Fehler+aufgetreten."
wpcf7-messages[upload_file_type_invalid] "Es+ist+nicht+erlaubt,+Dateien+dieses+Typs+hochzuladen."
wpcf7-messages[upload_file_too_large] "Diese+Datei+ist+zu+gro?."
wpcf7-messages[upload_failed_php_error] "Beim+Hochladen+der+Datei+ist+ein+Fehler+aufgetreten."
wpcf7-messages[invalid_date] "Das+Datumsformat+ist+ungültig."
wpcf7-messages[date_too_early] "Das+Datum+liegt+vor+dem+frühesten+zul?ssigen+Datum."
wpcf7-messages[date_too_late] "Das+Datum+liegt+nach+dem+sp?testen+zul?ssigen+Datum."
wpcf7-messages[invalid_number] "Das+Zahlenformat+ist+ungültig."
wpcf7-messages[number_too_small] "Die+Zahl+ist+niedriger+als+das+zul?ssige+Minimum."
wpcf7-messages[number_too_large] "Die+Zahl+ist+gr??er+als+das+zul?ssige+Maximum."
wpcf7-messages[quiz_answer_not_correct] "Die+Antwort+auf+das+Quiz+ist+falsch."
wpcf7-messages[invalid_email] "Die+eingegebene+E-Mail-Adresse+ist+ungültig."
wpcf7-messages[invalid_url] "Die+URL+ist+ungültig."
wpcf7-messages[invalid_tel] "Die+Telefonnummer+ist+ungültig."
wpcf7-additional-settings ""
civicrm-entity "Contact"
civicrm-action "create"
civicrm-parameters "contact_type=Individual&source=Wordpress"
wpcf7-save "Speichern"
What can I do? I cannot set up forms without the CRM integration now. Additionally, I think it’s not possible to change settings of other forms without enabling the processing at the same time. I’d like to avoid re-installing the plugin since I have other forms set up. Could this fix it? Is there a way to backup them and replay them after re-installing?
Thank you for your help.
]]>The API call includes a list for multi-select or multi-check boxes like “A, B, C” but the API expects an array like [“A”,”B”,”C”].
The result is that form submissions with multiple selections fail.
Hullo!
We are unable to access /wp-admin/options-general.php?page=cf7_civi_admin because the CiviCRM Path has trailing white space.
Unfortunately, it cannot be removed through the CMS because the page times out! We were able to fix it on a staging site where we had DB access.
Thanks!
]]>@jmcyclist – your question is closed to replies, hence this new topic. A long time ago you said:
I’m not having any luck getting this plugin to create new individuals in CiviCRM. I have a site key and API key setup but I’m a little confused as to what to enter for the CiviCRM host. Should that just be the domain of the site I have CiviCRM installed on, which is the same site I have this plugin installed in? Should I enter localhost there or the domain itself?
If this plugin and CiviCRM are on the same WordPress site then leave the Server setting blank. The Server is required when CiviCRM is on a different server.
We have changed the configuration screen a bit and added validation to it which should make configuration easier now.
]]>@j2dw – your question is closed to replies, hence this new topic. You said:
1. If I am using the CiviCRM WordPress plugin, do I still need an API key?
2. How do I find the API key?
3. What are the plans to update this plugin?
4. Can it only create or can it also update in the case of someone submitting a form twice, for example.
1. If this plugin and CiviCRM are on the same WordPress site then you don’t need an API key. Keys are required if you want to connect to CiviCRM on a different server (which does not have to be WordPress).
2. The Site Key is in your civicrm.settings.php
file – see https://docs.civicrm.org/sysadmin/en/latest/setup/site-key/
For the User Key, first create a user to handle these form submissions, install the ‘API Key’ extension (https://civicrm.org/extensions/api-key) then copy the API key from that user.
3. It has been updated a few times but the purpose is quite specific: it takes a Contact Form 7 submission and sends it to a CiviCRM API call of your choosing. Providing it does that, there are unlikely to be many updates.
4. That depends on the API call you choose. For more complex processing, consider using the CiviCRM Form Processor extension
]]>@korayloker – your question is closed to new replies, hence this new topic. You said:
hi, thanks for the plugin. I followed the blog post, mentioned in a previous reply for how to use it. I have my api and site keys in plugin settings saved, civicrm set ok (checked with internal api explorer, it works) however the contact form in wordpress can’t reach api and thus can’t create a contact.
my webserver tells me that the api call was shown a 403 error (which I’m not getting if I use the keys as parameters when trying) and it’s reasonable as the 403 getting url has no parameters. I’ve tried to see if the POST method carries, but there is no network traffic when sending the form in WordPress…
I can’t see what I’m missing. How can I check which POST request is sent by the plugin to my civicrm?
We have added validation to the configuration page that should make it easier to track down configuration problems. Please try the latest version and see if that fixes your problem.
]]>@mrprainx – your question is now closed to replies, hence this new topic. You said:
Is it possible to send a contact to CiviCRM only if the user check a specific checkbox?
This is fundamental for Privacy (GDPR) reason.
The plugin itself doesn’t support that, but you could make the checkbox required so the form will not submit unless that is checked.
Alternatively you could use the CiviCRM Form Processor extension or custom code to create an API so that the data is only saved to CiviCRM if the box is ticked.
]]>When I have contact form 7 and contact form 7 civicrm integration installed and activated, I get the following error when I try to go to the contact form 7 civicrm integration settings page:
Fatal error: Uncaught Error: Class ‘CRM_Core_Config’ not found in /home/benschnell/public_html/wp-content/plugins/contact-form-7-civicrm-integration/class.api.php:127 Stack trace: #0 /home/benschnell/public_html/wp-content/plugins/contact-form-7-civicrm-integration/cf7_civi_admin.php(84): civicrm_api3->__construct(Array) #1 /home/benschnell/public_html/wp-content/plugins/contact-form-7-civicrm-integration/views/settings.php(6): cf7_civi_admin::validate() #2 /home/benschnell/public_html/wp-content/plugins/contact-form-7-civicrm-integration/cf7_civi_admin.php(106): include(‘/home/benschnel…’) #3 /home/benschnell/public_html/wp-content/plugins/contact-form-7-civicrm-integration/cf7_civi_admin.php(61): cf7_civi_admin::view(‘settings’, Array) #4 /home/benschnell/public_html/wp-includes/class-wp-hook.php(287): cf7_civi_admin::display_page(”) #5 /home/benschnell/public_html/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(”, Array) #6 /home/benschnell/public_html/wp-includes/plugin.php(478): WP_Hook->do_action(Arra in /home/benschnell/public_html/wp-content/plugins/contact-form-7-civicrm-integration/class.api.php on line 127
I have not configured any settings. I get this error right away out of the box. Any suggestions?
]]>Hello.
This plugin is very useful! Thank you for sharing it.
Is it possible to send a contact to CiviCRM only if the user check a specific checkbox?
This is fundamental for Privacy (GDPR) reason.
Thank you in advance.
]]>hi, thanks for the plugin. I followed the blog post, mentioned in a previous reply for how to use it. I have my api and site keys in plugin settings saved, civicrm set ok (checked with internal api explorer, it works) however the contact form in wordpress can’t reach api and thus can’t create a contact.
my webserver tells me that the api call was shown a 403 error (which I’m not getting if I use the keys as parameters when trying) and it’s reasonable as the 403 getting url has no parameters. I’ve tried to see if the POST method carries, but there is no network traffic when sending the form in WordPress…
I can’t see what I’m missing. How can I check which POST request is sent by the plugin to my civicrm?
]]>I have a few questions before I consider installing this plugin.
1. If I am using the CiviCRM WordPress plugin, do I still need an API key?
2. How do I find the API key?
3. What are the plans to update this plugin?
4. Can it only create or can it also update in the case of someone submitting a form twice, for example.
Thanks!
]]>I’m not having any luck getting this plugin to create new individuals in CiviCRM. I have a site key and API key setup but I’m a little confused as to what to enter for the CiviCRM host. Should that just be the domain of the site I have CiviCRM installed on, which is the same site I have this plugin installed in? Should I enter localhost there or the domain itself?
]]>