WPML
Status
Resolved
Reported for
WPML Multilingual for CF7 1.2.1
Resolved in
Contact Form 7 Multilingual 1.2.2
Related plugin/theme
Contact Form 7
Topic tags
Compatibility

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

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 →