• Resolved amesserer

    (@amesserer)


    since Update to v5.4. forms are not sent in some cases. In some cases it works, in some not. I rolled back to v5.3.2. – it seems to work again.

    The log reports:
    PHP Warning: Invalid argument supplied for foreach() in /homepages/8/d350113630/htdocs/WP_RECHT247_PRD/wp-content/themes/Avada-child/includes/wpcf7.php on line 253

    the appropriate code in /wpcf7.php is
    ….

    /**
    	 * Modify Ajax JSON response. Add custom error messages.
    	 *
    	 * @param $response
    	 * @param $result
    	 * @return mixed
    	 */
    	public function filterAjaxJsonEcho($response, $result) {
    		$errors = [];
    
    		foreach ($response['invalidFields'] as $key => $field) {
    			$jsonReason = json_decode($field['message'], true);
    
    			//  Skip if it's simple text
    			if (empty($jsonReason)) {
    				continue;
    			}
    
    			$errors = array_unique(array_merge($errors, $jsonReason['errors'] ?? []));
    			//  Field error message
    			$message = $jsonReason['message'] ?? null;
    			//  Remove field if empty message
    			if (empty($message)) {
    				unset($response['invalidFields'][$key]);
    			} else {
    				$response['invalidFields'][$key]['message'] = $message;
    			}
    		}

    ….
    line 253 is: foreach ($response[‘invalidFields’] as $key => $field) {

Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter amesserer

    (@amesserer)

    P.S. Thanks for your support on this issue

    Plugin Author Takayuki Miyoshi

    (@takayukister)

    The log says:

    wp-content/themes/Avada-child/includes/wpcf7.php on line 253

    It is in your theme, has nothing to do with Contact Form 7.

    Thread Starter amesserer

    (@amesserer)

    Dear Takayuki,
    thanks for your feedback. I′m not sure about these entries in the logs as I am not a programmer, sorry.

    But, I made additonal tests with a testing form, the link to this is:
    https://test-recht24-7.de/testcf7-formular/

    With CF7 version 5.3.2. it works sending data from this form.
    With CF7 version 5.4 (currently installed) it does not work to send data. The form is always in “loading mode” after klicking SEND DATA.

    Would be great, if you can take a short look into this.
    Thanks for your support, Kind Regards Andreas

    Plugin Author Takayuki Miyoshi

    (@takayukister)

    What other plugins and theme do you use on the site?

    Thread Starter amesserer

    (@amesserer)

    we are using Avada theme and following plugins in connection with CF7:

    Advanced Custom Fields PRO
    Contact Form 7
    Contact Form 7 Conditional Fields Pro
    Contact Form 7 Shortcode Enabler
    Contact Form CFDB7
    Drag and Drop Multiple File Upload – Contact Form 7
    Honeypot for Contact Form 7
    Redirection for Contact Form 7

    Beside this several other plugins for other purposes. Do you need the complete list?

    Plugin Author Takayuki Miyoshi

    (@takayukister)

    Yes, please.

    Thread Starter amesserer

    (@amesserer)

    this is the complete list of plugins:

    Advanced Custom Fields PRO
    Advanced Order Export For WooCommerce
    Autoptimize
    Avada Builder
    Avada Core
    CartBounty – Save and recover abandoned carts for WooCommerce
    Checkout Field Editor for WooCommerce
    Code Snippets
    Contact Form 7
    Contact Form 7 Conditional Fields Pro
    Contact Form 7 Shortcode Enabler
    Contact Form CFDB7
    Cookie Notice & Compliance for GDPR / CCPA
    Drag and Drop Multiple File Upload – Contact Form 7
    Duplicate Page
    Duplicator
    Honeypot for Contact Form 7
    Listo
    Loco Translate
    MaxButtons
    Redirection
    Redirection for Contact Form 7
    Sofortueberweisung / Klarna Gateway for Woocommerce
    TablePress
    Ultimate FAQ – WordPress FAQ Plugin
    WC Password Strength Settings
    WooCommerce
    WooCommerce Micropayment Gateway
    WooCommerce Subscriptions
    WooRechnung
    Wordfence Security
    WP Mail SMTP
    WP Rollback
    Yoast SEO

    Plugin Author Takayuki Miyoshi

    (@takayukister)

    Try switching to the default theme, deactivating all plugins excluding Contact Form 7, Listo, WooCommerce, WP Mail SMTP and Yoast SEO, and clearing all cache data.

    Why you are advised to deactivate plugins and switch to the default theme.

    I also had a problem with forms. They weren’t working and I had to upload older version than 5.4.
    Please, read this article about GDPR/CCPA Cookie Consent. The answer of the problem is here: https://complianz.io/why-the-wp-consent-api-is-important-a-case-study-with-cf7-and-recaptcha/
    I hope Takayuki Miyoshi can resolve this situation because I love Contact Form 7. ??

    Thread Starter amesserer

    (@amesserer)

    Dear Takayuki Miyoshi (@takayukister),
    thanks for your advice. I now deactivated all plugins except
    CF7
    Listo
    Redirection for Contact Form 7 (as I need this for redirecting after submitting)
    WooCommerce
    WP Mail SMTP
    Yoast Seo

    and switched to WP Twenty Twenty Theme
    Now it works with test form
    https://test-recht24-7.de/testcf7-formular/
    with version 5.4 of CF7

    I need to find out which plugin interferes with CF7 newest version.

    Thread Starter amesserer

    (@amesserer)

    Dear Mariana Eguaras (@mreguaras),
    also thank you for advising to this article.

    When only deactivating Cookie Notice & Compliance for GDPR / CCPA in the original configuration (all other plugins activated) the form submission does not work with newest version of CF7. So this is not causing the issue on my site.

    Kind Regards, Andreas

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘forms not sent (since last update to CF7 – version 5.4)’ is closed to new replies.