The MU forums have moved to WordPress.org

Editing mu.php (to enable theme editor) causes warning problem at admin page (3 posts)

  1. richardpd
    Member
    Posted 14 years ago #

    Hi
    I wanted to edit my wpmu theme & am new to wpmu.
    I followed the instructions/tutorial at this site(editing mu.php):
    http://www.clickonf5.org/wordpress-mu/enable-theme-plugin-editor-wordpress-mu/5790
    <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
    Before Changes

    unset( $submenu['plugins.php'][15] ); // always remove the plugin editor
    unset( $submenu['themes.php'][10] ); // always remove the themes editor
    After Changes

    /* unset( $submenu['plugins.php'][15] ); */ // always remove the plugin
    /* unset( $submenu['themes.php'][10] ); */ // always remove the themes

    2. After removing this check, you should be able to see the theme editor and plugin editor option but still those pages will not accessible. To remove that barrier, you need to make below changes in mu.php only.

    Search for the term “if ( strpos( $_SERVER['PHP_SELF'], ‘user-new.php’” in mu.php and then see below the before and after code for the same line (search result)
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

    This did not work successfully for me and although I have undone the changes to mu.php I have Warnings in my site admin page that remain.These are:

    Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\wpmu\wp-admin\includes\mu.php:1) in C:\xampp\htdocs\wpmu\wp-includes\functions.php on line 808

    Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\wpmu\wp-admin\includes\mu.php:1) in C:\xampp\htdocs\wpmu\wp-includes\functions.php on line 809

    Meanwhile I have downloaded and installed a wp plugin that allows me to edit my wpmu themes.
    So now I want to get rid of these warning errors.Can anyone please advise me how I can best fix this please?
    I look forward to helpful replies,thanks

  2. andrea_r
    Moderator
    Posted 14 years ago #

    "Warning: Cannot modify header information - headers already sen"

    Means you have blank lines at the bottom of the files you edited. remove the blank line after the final ?>

  3. richardpd
    Member
    Posted 14 years ago #

    Hi andrea_r

    Thanks for your reply.
    In my case removing blank line after ?> did not work (tried this with Notepad/GVim/Emacs-no success).

    Instead replacing with a new mu.php solved this
    (as per details at WPMU FAQ page:
    http://codex.wordpress.org/FAQ_Troubleshooting#How_do_I_solve_the_Headers_already_sent_warning_problem.3F

    How do I solve the Headers already sent warning problem?
    Description: You get a warning message on your browser that says:

    Warning: Cannot modify header information - headers already sent by (output started at

    Reason and Solution :

    It is usually because there are spaces, new lines, or other garbage before an opening <?php tag or after a closing ?> tag, typically in wp-config.php. This could be true about some other file too, so please check the error message, as it will list the specific file name where the error occurred (see "Interpreting the Error Message" below). Replacing the faulty file with one from your most recent backup or one from a fresh WordPress download is your best bet, but if neither of those are an option, please follow the steps below.

    Just because you cannot see anything does not mean that PHP sees the same.

    1.Download the file mentioned in the error message.
    2.Open that file in a plain text editor (NOT MS Word or similar. Notepad or BBEdit are fine).
    3.Check that the very first characters are <?php
    4.Check that the very last characters are ?>
    To be sure about the end of the file, do this:

    1.Place the cursor between the ? and >
    2.Now press the DELETE key on your computer
    ■Note to MAC users: The "DELETE" key on a PC deletes characters to the right of the cursor. That is the key noted here.
    3.Keep that key pressed
    4.For at least 15 seconds
    5.Now type > and
    6.save without pressing any other key at all.
    7.If you press another key, you will bring the problem back.
    Also check the encoding of the file. If the file is encoded as UTF-8 with BOM, the BOM is seen as a character which starts the output. )

    Many thanks

About this Topic

  • Started 14 years ago by richardpd
  • Latest reply from richardpd