• Resolved desertlynx

    (@desertlynx)


    I’m working on a company intranet site and a requirement is that the site is private. So, I used the plugin: ‘Private WP 1.1’, which seems to work fine. However, it appears to cause an error due to a flaw in the chosen theme ‘Oriental‘.

    The error is:

    'Warning: Cannot modify header information - headers already sent by (output started at /home/distrib/public_html/wp-content/themes/oriental/index.php:1) in /home/distrib/public_html/wp-includes/pluggable.php on line 850'

    I’m aware this is usually caused by spaces before and after the <?php ?> tags, but I’ve checked all the usual places (my php skills are lacking, but I checked wp-config, wp-login etc. re-uploaded the theme fresh, etc.) and can’t find anything. I must point out the error only comes up when using this theme, so I imagine the problem is somewhere in the php of the theme’s header.

    Where should I look? Or, I suppose more accurately, what should I look for?

Viewing 10 replies - 1 through 10 (of 10 total)
  • Where should I look?

    /home/distrib/public_html/wp-content/themes/oriental/index.php

    in the file with the problem (its telling you).

    line 1 — so its linebreaks or spaces or hidden chars at the top of that file.

    Thread Starter desertlynx

    (@desertlynx)

    I double checked the theme index.php, unless I’m blind, there’s nothing at the start of that file (I’m using Notepad++).

    However, the first line of code is ‘<?php get_header(); ?>’. would I be right in guessing that this could indicate the problem is in the header.php instead?

    (coincidentally, there was a trailing line break in header.php which I have since removed, but to no avail)

    Thread Starter desertlynx

    (@desertlynx)

    hmm.. more complications:

    • the problem only manifests when the plugin “Private WP 1.1” is used
    • once logged in, the issue no longer arises

    tell you what, email me the plugin files, and a copy of the theme you said youre using?

    if you can zip them up and send them to whoo et village-idiot.org then I’ll take a look as soon as I get them.

    Thread Starter desertlynx

    (@desertlynx)

    done

    Heres a screenshot of whats inside the theme’s index.php that is the subject of this thread:

    https://www.village-idiot.org/broke/hidden-chars.gif

    those error messages are never wrong ??

    Thread Starter desertlynx

    (@desertlynx)

    Wow, excellent job finding that one. Thank you

    I cheat. i look at the files on my server. windows is evil.

    Thread Starter desertlynx

    (@desertlynx)

    Fixed!
    I have to admit, finding that character proved more difficult than I expected, I had to go and use a hex editor to remove the non-printing characters (which notepad++ seemed to ignore).

    My guess is they were asian characters (as is the theme’s author, I believe) and my computer lacked whatever character set to display them.

    Once again, thank you

    youre welcome .. its a common problem, and not easy to see when its on the first line. Its nice to get a link to something that actually works in windows — thats the primary reason I never recommend anything beyond the generic “plain text editor”.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘‘Cannot modify header information…’ – Theme vs Plugin problem’ is closed to new replies.