WPML

Overview of the Issue

If you are using Contact Form 7 Multilingual plugin, you may encounter a PHP warning when viewing a page that includes a translated contact form. The warning states:

Warning: Undefined array key "title" in /path-to-website/wp-content/plugins/contact-form-7/includes/contact-form-functions.php on line 239

Workaround

This issue is fixed in Contact Form 7 Multilingual 1.2.2. Updating solves it on your site, so you only need this workaround if you can’t update yet.

Please, make sure of having a full backup of your site before proceeding.

  • Open …/wp-content/plugins/contact-form-7-multilingual/classes/shortcodes.php file.
  • Look for this piece of code:
    if ( ! $form && ! empty( $atts['title'] ) ) {
    	$form = wpcf7_get_contact_form_by_title( trim( $atts['title'] ) );
    	unset( $atts['title'] );
    }
  • Comment out line 30:
    if ( ! $form && ! empty( $atts['title'] ) ) {
    	$form = wpcf7_get_contact_form_by_title( trim( $atts['title'] ) );
    	//unset( $atts['title'] );
    }

All known issues

Still Seeing This Issue?

If updating doesn’t fix it, ask a support question and we’ll look into it with you.