WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] another validation problem... (17 posts)

  1. jelly
    Member
    Posted 9 years ago #

    I have a problem getting my kubrick-based site to validate (uri: http://laugesen.org/wordpress/). The problem is, that somewhere in the parsing, something puts an illegal character in the very beginning of the code:
    "Line 1, column 0: character "" not allowed in prolog

    ���<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www"

    - does anyone have an idea which file to look at?

    (the problem only occurs in the theme that is active - I suppose it'll be in one of the files in the theme-folder?)

    :) Jesper

  2. exploding-boy
    Member
    Posted 9 years ago #

    There is some type of space or character before your DOCTYPE. On your current them, go to your header.php and remove any space before <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0...

  3. moshu
    Member
    Posted 9 years ago #

    Did you open/edit your header.php ?

  4. jelly
    Member
    Posted 9 years ago #

    @exploding-boy: If only it was that simple :)
    I've already checked if that was the case - and it isn't... I've even replaced the file in it's enterity, using c/p via notepad to eliminate all possibilities of a 'invisible' sign to be transfered on...

  5. jelly
    Member
    Posted 9 years ago #

    @moshu: yes - the theme is build on a localised version of kubrick

  6. tobbaz
    Member
    Posted 9 years ago #

    No solution for this one? :(

    I have the exactly same problem, but not just with the first line, in the body text too.

    http://validator.w3.org/check?verbose=1&uri=http%3A//tobiasbergius.se/blogg/

    There's nothing before the doctype and I've tried both UTF-8 and UTF-8 without BOM.

    Why doesn't it work?!

  7. Check the theme's header.php file for blank spaces or odd characters before the !DOCTYPE tag. If it looks fine, see if disabling all plugins creates any improvement.

  8. Mark (podz)
    Support Maven
    Posted 9 years ago #

    tobbaz - what program are you using to edit your files ?

    If it is anything made by Adobe or Macromedia, they are very probably causing the problems.

  9. tobbaz
    Member
    Posted 9 years ago #

    Thanks for quick replies.

    macmanx: No characters before the doctype. No difference when disabling all plugins.

    podz: Notepad++

  10. Mark (podz)
    Support Maven
    Posted 9 years ago #

    Can you post just that part of your file over at http://www.phpfi.com ?

  11. tobbaz
    Member
    Posted 9 years ago #

  12. Mark (podz)
    Support Maven
    Posted 9 years ago #

    Nothing wrong......

    We've seen these 'prolog' problems here before, but with feeds. And with those we can never establish what the problem is - but for some reason it literally just goes away. I have had this with my feeds before too - and they are fine now. It took a couple of days to go away.
    Before your page actually outputs to the screen, the code goes through any number of files so I guess one of them is choking on something strange but it'll clear it's throat soon. The only consolation being that those are the only 2 errors and your page does otherwise validate.

  13. tobbaz
    Member
    Posted 9 years ago #

    Yah, I had the same problem with my feed too. And it just went away. So I guess I'll just wait then. :)

    Thanks for you help. :)

  14. Check for any strange characters before <?php in the index.php file in your blog root (not your theme's index.php file).

  15. jelly
    Member
    Posted 9 years ago #

    thanx for the help so far - Even though my problem persists...

    @podz: using ultraedit
    @macmanx: no strange characters in root/index.php

    ... I guess I have to wait a few more days to see if it'll pass??? (the absolute strangest advice on how to deal with a software problem I've received so far ;) )

  16. jelly
    Member
    Posted 8 years ago #

    FYI: the problem disappeared after updating to WP 1.5.2. :) Jesper

  17. blndcat
    Member
    Posted 8 years ago #

    I've just gone through solving the same problem. I tried everything including upgrading from 1.5.1 to 1.5.2 but it didn't solve the problem.

    What did was to check *BOTH* header.php and index.php (of the theme) for the BOM. Because index.php calls <?php get_header(); ?> so if index.php has a BOM then what gets generated is
    <BOM><!DOCTYPE...
    even if header.php doesn't have a BOM

Topic Closed

This topic has been closed to new replies.

About this Topic