Übersicht über das Problem
Wenn Sie das Plugin Contact Form 7 Multilingual verwenden, tritt möglicherweise eine PHP-Warnung auf, wenn Sie eine Seite anzeigen, die ein übersetztes Kontaktformular enthält. Die Warnung lautet:
Warning: Undefined array key "title" in /path-to-website/wp-content/plugins/contact-form-7/includes/contact-form-functions.php on line 239
Problemumgehung
Dieses Problem ist in Contact Form 7 Multilingual 1.2.2 behoben. Ein Update behebt dies auf Ihrer Website, daher benötigen Sie diese Problemumgehung nur, wenn Sie noch nicht aktualisieren können.
Bitte erstellen Sie ein vollständiges Backup Ihrer Website, bevor Sie fortfahren.
- Öffnen Sie die Datei …/wp-content/plugins/contact-form-7-multilingual/classes/shortcodes.php.
- Suchen Sie nach diesem Code-Abschnitt:
if ( ! $form && ! empty( $atts['title'] ) ) { $form = wpcf7_get_contact_form_by_title( trim( $atts['title'] ) ); unset( $atts['title'] ); } - Kommentieren Sie Zeile 30 aus:
if ( ! $form && ! empty( $atts['title'] ) ) { $form = wpcf7_get_contact_form_by_title( trim( $atts['title'] ) ); //unset( $atts['title'] ); }