Cannot modify header information - Verursacher Plugins bereits deinstalliert

  • Hi Leute,

    ich kann mich nicht mehr in Wordpress einloggen, und erhalte folgende Fehlern:

    Warning: Cannot modify header information - headers already sent by (output started at /homepages/42/d667832489/htdocs/clickandbuilds/FoodVise/wp-content/themes/amplechild/functions.php:3) in /homepages/42/d667832489/htdocs/clickandbuilds/FoodVise/wp-login.php on line 394

    Warning: Cannot modify header information - headers already sent by (output started at /homepages/42/d667832489/htdocs/clickandbuilds/FoodVise/wp-content/themes/amplechild/functions.php:3) in /homepages/42/d667832489/htdocs/clickandbuilds/FoodVise/wp-login.php on line 407

    Warning: Cannot modify header information - headers already sent by (output started at /homepages/42/d667832489/htdocs/clickandbuilds/FoodVise/wp-content/themes/amplechild/functions.php:3) in /homepages/42/d667832489/htdocs/clickandbuilds/FoodVise/wp-includes/pluggable.php on line 915

    Warning: Cannot modify header information - headers already sent by (output started at /homepages/42/d667832489/htdocs/clickandbuilds/FoodVise/wp-content/themes/amplechild/functions.php:3) in /homepages/42/d667832489/htdocs/clickandbuilds/FoodVise/wp-includes/pluggable.php on line 916

    Warning: Cannot modify header information - headers already sent by (output started at /homepages/42/d667832489/htdocs/clickandbuilds/FoodVise/wp-content/themes/amplechild/functions.php:3) in /homepages/42/d667832489/htdocs/clickandbuilds/FoodVise/wp-includes/pluggable.php on line 917

    Warning: Cannot modify header information - headers already sent by (output started at /homepages/42/d667832489/htdocs/clickandbuilds/FoodVise/wp-content/themes/amplechild/functions.php:3) in /homepages/42/d667832489/htdocs/clickandbuilds/FoodVise/wp-includes/pluggable.php on line 918

    Warning: Cannot modify header information - headers already sent by (output started at /homepages/42/d667832489/htdocs/clickandbuilds/FoodVise/wp-content/themes/amplechild/functions.php:3) in /homepages/42/d667832489/htdocs/clickandbuilds/FoodVise/wp-includes/pluggable.php on line 919

    Warning: Cannot modify header information - headers already sent by (output started at /homepages/42/d667832489/htdocs/clickandbuilds/FoodVise/wp-content/themes/amplechild/functions.php:3) in /homepages/42/d667832489/htdocs/clickandbuilds/FoodVise/wp-includes/pluggable.php on line 920

    Warning: Cannot modify header information - headers already sent by (output started at /homepages/42/d667832489/htdocs/clickandbuilds/FoodVise/wp-content/themes/amplechild/functions.php:3) in /homepages/42/d667832489/htdocs/clickandbuilds/FoodVise/wp-includes/pluggable.php on line 923

    Warning: Cannot modify header information - headers already sent by (output started at /homepages/42/d667832489/htdocs/clickandbuilds/FoodVise/wp-content/themes/amplechild/functions.php:3) in /homepages/42/d667832489/htdocs/clickandbuilds/FoodVise/wp-includes/pluggable.php on line 924

    Warning: Cannot modify header information - headers already sent by (output started at /homepages/42/d667832489/htdocs/clickandbuilds/FoodVise/wp-content/themes/amplechild/functions.php:3) in /homepages/42/d667832489/htdocs/clickandbuilds/FoodVise/wp-includes/pluggable.php on line 925

    Warning: Cannot modify header information - headers already sent by (output started at /homepages/42/d667832489/htdocs/clickandbuilds/FoodVise/wp-content/themes/amplechild/functions.php:3) in /homepages/42/d667832489/htdocs/clickandbuilds/FoodVise/wp-includes/pluggable.php on line 926

    Warning: Cannot modify header information - headers already sent by (output started at /homepages/42/d667832489/htdocs/clickandbuilds/FoodVise/wp-content/themes/amplechild/functions.php:3) in /homepages/42/d667832489/htdocs/clickandbuilds/FoodVise/wp-includes/pluggable.php on line 929

    Warning: Cannot modify header information - headers already sent by (output started at /homepages/42/d667832489/htdocs/clickandbuilds/FoodVise/wp-content/themes/amplechild/functions.php:3) in /homepages/42/d667832489/htdocs/clickandbuilds/FoodVise/wp-includes/pluggable.php on line 930

    Warning: Cannot modify header information - headers already sent by (output started at /homepages/42/d667832489/htdocs/clickandbuilds/FoodVise/wp-content/themes/amplechild/functions.php:3) in /homepages/42/d667832489/htdocs/clickandbuilds/FoodVise/wp-includes/pluggable.php on line 931

    Warning: Cannot modify header information - headers already sent by (output started at /homepages/42/d667832489/htdocs/clickandbuilds/FoodVise/wp-content/themes/amplechild/functions.php:3) in /homepages/42/d667832489/htdocs/clickandbuilds/FoodVise/wp-includes/pluggable.php on line 932

    Die obigen Fehler werden mir seit der Installation eines Plugins angezeigt, welches ich dann über FTP gelöscht habe.
    Nun ist auch kein erneutes einloggen mehr möglich.
    In der functions.php in Zeile 3 binde ich lediglich die Style Sheets aus dem Haupt Theme-Ordner ein.

    Dort steht bei mir:

    <?php function child_theme_styles() {

    $parent_style = 'ample';

    wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
    wp_enqueue_style( $parent_style, get_template_directory_uri() . '/rtl.css' );
    wp_enqueue_style( 'amplechild',
    get_stylesheet_directory_uri() . '/style.css',
    array( $parent_style ),
    wp_get_theme()->get('Version')
    );
    }
    add_action( 'wp_enqueue_scripts', 'child_theme_styles()' );?>

    Weiß jemand woran der Fehler liegt?

    Vielen Dank für eure Hilfe!

    • 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

  • Vermutlich ist nach dem [FONT=courier new]?>[/FONT] am Ende noch ein Leerzeichen oder eine Leerzeile.

    Lass das [FONT=courier new]?>[/FONT] am Ende am besten ganz weg, PHP braucht das nicht.

    Ergänzung: Und das [FONT=courier new]()[/FONT] bei [FONT=courier new]child_theme_styles[/FONT] in der [FONT=courier new]add_action[/FONT] Zeile sollte auch weg.

    Einmal editiert, zuletzt von b3317133 (20. Februar 2017 um 22:22)

  • Ich hab das ?> am Ende entfernt, Leerzeile war auch keine drin...
    Kann es sein das Wordpress irgendwie ein Problem mit dem einbinden, der verwendeten Syntax hat?

  • Nein, das habe ich bereits gecheckt.

    Habe mal den ganzen Child-Theme Ordner vom Server genommen, dass ich mich anmeden kann. Wenn ich jetzt den Child Theme Ordner wieder hochlade,
    aber die functions.php weglasse, hat er auch keine Probleme. Sobald ich dann allerdings wieder versuche das Skript einzubinden seh ich direkt auf
    meiner Website folgenden Fehler:


    Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'child_theme_styles()' not found or invalid function name in /homepages/42/d667832489/htdocs/clickandbuilds/FoodVise/wp-includes/class-wp-hook.php on line 298


    Es scheint irgendwie die wp_enqueue_style Funktion nicht hinterlegt zu sein.

  • das ist falsch
    add_action( 'wp_enqueue_scripts', 'child_theme_styles()' );

    bei child_theme_styles gehören die Klammern weg
    add_action( 'wp_enqueue_scripts', 'child_theme_styles' );

    [size=10]Bitte immer zuerst die Forensuche nutzen und erst danach Deine Fragen hier im Forum stellen, denn sehr vieles wurde schon mehrfach beantwortet. Bitte dabei auch die Forenregeln beachten.
    Kein Support per PN - Fragen gehören ins Forum.[/SIZE]
    [size=8]Wenn du eine weise Antwort verlangst, musst du vernünftig fragen. (Johann Wolfgang von Goethe)[/SIZE]

  • Die Klammern sind jetzt weg, bei add_action.

    Mal ein Auszug aus der class-wp-hook.php:298 :

    } elseif ( $the_['accepted_args'] >= $num_args ) {
    $value = call_user_func_array( $the_['function'], $args );

    Diesbezüglich hat mich auch google nicht weiter gebracht.

Jetzt mitmachen!

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