PHP.80 - Fehlermeldung im Log - WP 5.8.1

  • Hallo,

    seit der Umstellung auf PHP 8.0 habe ich Fehlermeldungen im Log.

    Schein was mit dem Child-Theme zu tun haben.

    Für Hilfe, Danke voraus.

    Code
    AH01071: Got error 'PHP message: PHP Warning: Constant TEMPLATEPATH already defined in /var/www/vhosts/example.com/httpdocs/wp-includes/default-constants.php on line 393PHP message: PHP Warning: Constant STYLESHEETPATH already defined in /var/www/vhosts/example.com/httpdocs/wp-includes/default-constants.php on line 400PHP message: PHP Warning: Undefined array key 0 in /var/www/vhosts/example.com/httpdocs/wp-content/themes/twentyfifteen-child/header.php on line 17PHP message: PHP Warning: Attempt to read property "ID" on null in /var/www/vhosts/example.com/httpdocs/wp-content/themes/twentyfifteen-child/header.php on line 17PHP message: PHP Warning: Attempt to read property "ID" on null in /var/www/vhosts/example.com/httpdocs/wp-content/themes/twentyfifteen-child/header.php on line 88PHP message: PHP Warning: Trying to access array offset on value of type bool in /var/www/vhosts/example.com/httpdocs/wp-content/themes/twentyfifteen-child/header.php on line 88PHP message: PHP Warning: Undefined array key 0 in /var/www/vhosts/example.com/httpdocs/wp-content/themes/twentyfifteen-child/header.php on line 91PHP message: PHP Warning: Attempt to read property "ID" on null in /var/www/vhosts/example.com/httpdocs/wp-content/themes/twentyfifteen-child/header.php on line 91'
    Code
    AH01071: Got error 'PHP message: PHP Warning: Constant TEMPLATEPATH already defined in /var/www/vhosts/example.com/httpdocs/wp-includes/default-constants.php on line 393PHP message: PHP Warning: Constant STYLESHEETPATH already defined in /var/www/vhosts/example.com/httpdocs/wp-includes/default-constants.php on line 400PHP message: PHP Warning: Trying to access array offset on value of type bool in /var/www/vhosts/example.com/httpdocs/wp-content/themes/twentyfifteen-child/header.php on line 88'
    Code
    AH01071: Got error 'PHP message: PHP Warning: Constant TEMPLATEPATH already defined in /var/www/vhosts/example.com/httpdocs/wp-includes/default-constants.php on line 393PHP message: PHP Warning: Constant STYLESHEETPATH already defined in /var/www/vhosts/example.com/httpdocs/wp-includes/default-constants.php on line 400'

    Stück Brot dabei..? - Danke, Google kenne ich..

    2 Mal editiert, zuletzt von Mr.Quick (11. September 2021 um 10:11)

    • Anzeige

    Hallo!

    Wenn du gerade an deiner Website arbeitest oder dein aktuelles Hosting überdenkst: Wir betreiben mit NetzLiving eine Hosting-Plattform, die speziell auf Performance, Sicherheit und einfache Verwaltung ausgelegt ist.

    • ✔️ Schnelle Ladezeiten (optimiert für WordPress & Co.)
    • ✔️ Deutsche Server & DSGVO-konform
    • ✔️ Persönlicher Support (kein 0815-Ticket-System)

    Mehr erfahren

  • Scheinbar ist ja vor allem die header.php betroffen. Ggfs. macht es Sinn die header.php mit aktuellem Stand vom Eltern-Theme zu kopieren und nochmal neu für dein Child-Theme anzupassen. Das ist vermutlich notwendig da das Eltern-Theme updates zur Kompatibilität mit neueren PHP-Versionen erhält, dein Child-Theme musst Du dagegen selbst anpassen.

  • Leider hat es sich nicht erfüllt. Ich hab die Orginal header.php aus dem Theme am laufen.
    Fehlermeldung im Log weiterhin.

    Für Hilfe wieder Danke voraus.

    Stück Brot dabei..? - Danke, Google kenne ich..

  • Problem liegt wohl hier...

    default-constants.php

    funtions.php für das Child Theme

    Code
    function child_theme_styles() {
    wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
    wp_enqueue_style( 'child-theme-css', get_stylesheet_directory_uri() .'/style.css' , array('parent-style'));
    
    
    }
    add_action( 'wp_enqueue_scripts', 'child_theme_styles' );

    Stück Brot dabei..? - Danke, Google kenne ich..

  • Hallo, vielen Dank.

    Das ist der Code aus dem Parent-Theme. Aktuelles Theme: Twentyfifteen 3.0.

    Danke voraus.

    Stück Brot dabei..? - Danke, Google kenne ich..

    Einmal editiert, zuletzt von Mr.Quick (13. September 2021 um 00:04)

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!