• Hi everybody,
    I wrote a child theme for Thematic and I’m testing it.

    On my local web server and on a previous installation in my personal webspace everything went ok.
    Now I installed everything in a Bluehost space and every time I try to edit something (post, page) everything goes completely blank.

    I searched on the web and I found that this should be a problem of my theme, so I tried to:
    1) disable all the plugins;
    2) disable my theme’s functions.php file.

    With solution number 2 everything looks ok.
    So I’m debugging my functions.php to find the error, but I’m going crazy.

    What happens is the following:

    this functions.php

    <?php
    //
    //  Custom Child Theme Functions
    //
    ?>

    is ok.

    This one:

    <?php
    // modifica la struttura del footer
    function pippo_footer($thm_footertext) {
    	$thm_footertext .= 'xxx';
    	return $thm_footertext;
    }
    add_filter('thematic_footertext', 'pippo_footer');
    //end function ?>

    is also ok.

    But when I put together the two the problem raises.
    And this is to me absolutely crazy, I really don’t understand what’s happening.

    Can anybody help?
    Thanks,
    Andrea

    [Please post code or markup snippets between backticks or use the code button.]

Viewing 9 replies - 1 through 9 (of 9 total)
  • Enable WP_DEBUG, and report back with the Fatal Error being generated.

    Most likely, it is a “cannot redeclare function…” error.

    What is function pippo_footer(), and why are you adding it to your child Theme’s functions.php file?

    Also, what do you mean by “put the two together”? Can you post the entire code of the faulty functions.php file into a PasteBin, and link it here?

    Thread Starter jjcorradi

    (@jjcorradi)

    My pippo_footer() just writes something in the footer (I changed the info with an xxx to make things easier).

    When I say “put the two together” it means that my functions.php becomes:

    <?php
    //
    // Custom Child Theme Functions
    //
    ?>
    
    <?php
    // modifica la struttura del footer
    function pippo_footer($thm_footertext) {
    $thm_footertext .= 'xxx';
    return $thm_footertext;
    }
    add_filter('thematic_footertext', 'pippo_footer');
    //end function ?>

    This is the faulty functions.php (I don’t have any space or character at the end)

    [Please post code or markup snippets between backticks or use the code button.]

    Thread Starter jjcorradi

    (@jjcorradi)

    Enabled WP_DEBUG, the error returned is:

    Notice: wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or init hooks. Please see Debugging in WordPress for more information. (This message was added in version 3.3.) in /home6/omcapita/public_html/officinameccanica/wp-includes/functions.php on line 3587

    Warning: Cannot modify header information – headers already sent by (output started at /home6/omcapita/public_html/officinameccanica/wp-content/themes/omc/functions.php:12) in /home6/omcapita/public_html/officinameccanica/wp-includes/pluggable.php on line 866

    Why does it speak about line 3587 and 866? The functions.php is 19 lines!

    The issue appears to be in your theme’s function.php file at line 12

    Thread Starter jjcorradi

    (@jjcorradi)

    yes, you’re right… sorry but i’m going crazy.
    lines 3587 and 866 refer to wp-includes/functions.php, which is not MY functions.php

    See Solving “headers already sent” warnings. You need to understand how to analyse/read the error message.

    Thread Starter jjcorradi

    (@jjcorradi)

    I’m finding other people with the same problem, but still no solution

    Thread Starter jjcorradi

    (@jjcorradi)

    the problem is still alive if I switch from my own thematic child theme to plain thematic.

    Thread Starter jjcorradi

    (@jjcorradi)

    today I tried to do the same installation on bluehost and on another hosting (www.aruba.it):

    I did exactly the same things (except one: I changed the DB collation on Bluehost, it was set to latin Swedish – I don’t know why – and I changed to utf8_general_ci).

    On aruba hosting everything is ok; on Bluehost I have the problem.
    Every time I edit a post a blank screen is presented and – if I switch on the debug – the php error is reported:

    Warning: Cannot modify header information – headers already sent by (output started at /home6/omcapita/public_html/officinameccanica/wp-content/themes/omc/functions.php:12) in /home6/omcapita/public_html/officinameccanica/wp-includes/pluggable.php on line 866

    If I delete my functions.php the same error is reported referring to /home6/omcapita/public_html/officinameccanica/wp-includes/functions.php
    If I disable my custom theme and switch to plain thematic theme (new installation, nothing touched) the same error occurs.
    If I switch to default WordPress theme the error disappears.

    Which kind of setting on the hosting platform can drive to this?

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘child theme problem – blank pages’ is closed to new replies.