|
#1
|
||||
|
||||
|
Validation error
Trying to validate the HTML in my photoblog, and keep coming up with this error from the validator:
Code:
This page is not Valid XHTML 1.0 Transitional!
Below are the results of checking this document for XML well-formedness and validity.
1. Error Line 1 column 0: character "" not allowed in prolog.
��<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www
There are no characters preceding the DOCTYPE in any of the templates, and I've searched the code in index.php and cannot find where this is coming from. I have an old test install of v1.5, so I checked the validation on it, and it comes up clean - no errors and validates. Any ideas on where these characters are coming from??? |
|
#2
|
||||
|
||||
|
A link to your site would be helpful
__________________
Pixelpost Documentation | Visual Pixels | My Addons | Transition Bottlerocket Fund |
|
#3
|
||||
|
||||
|
Here's the link to the 1.6 install: http://www.kpimages.net/index.php
|
|
#4
|
||||
|
||||
|
you have some strange chars before the doctype declaration:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> PHP Code:
Pixelpost is UTF-8 compliant, you should not change that KArin |
|
#5
|
||||
|
||||
|
I know there are characters preceding the DOCTYPE - that's what is causing the validation error. What I do not know is where those characters are coming from. It happens with my template, and with both of the templates that are included in 1.6 (simple and horizon). I have searched every file that I can think of to check, and cannot find anything.
When I do "view source", select all, and paste it into my text editor (EditPadLite), I see a '?' before DOCTYPE and get this warning: The text you typed in contains some characters that cannot be represented in the file's character set. They have been replaced with question marks. Select Convert|Text Encoding in the menu to select a character set that contains the characters you are trying to type. When I try to change the encoding of the file, it is coming up and showing the original encoding as Windows 1252: Western European. I've brought up all of the template files and index.php, and have converted the encoding to UNICODE, UTF-8, saved and reuploaded them to the server, and I'm still getting the validation error. Any other ideas? PS/ I did change the character set back to utf8. I temporarily changed it to see if it would solve the validation issue. |
|
#6
|
||||
|
||||
|
Do you see the strange character in the template files too?
Do you have a line break or something like that there? Remove the <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /> in the template. Some editors try to change the encoding by some charset coding they find in the text (my UltraEdit does this with Unicode for example). Try converting everything to UTF-8 and delete everything before the first "<". Try to delete both lines before <head> and retype it by hand. Try a different editor and a fresh download. |
|
#7
|
||||
|
||||
|
No, there are no characters before the opening < for the doctype code.
No, there is no line break before the doctype code. Quote:
Quote:
Did that - no change. I had downloaded a fresh copy yesterday. I opened the zip file, and extracted just the index.php file to the same folder. I did not open it with a text editor at all. I uploaded it to my server, and revalidated the page - same problem. If you go to my contact page, that is one that I've done using my regular editor. The text encoding is UNICODE, UTF-8, the charset is UTF-8, and that page validates just fine. The validator warns that the file has a Unicode Byte-Order Mark (BOM) in it. The error message at the top states: Code:
Byte-Order Mark found in UTF-8 File.
The Unicode Byte-Order Mark (BOM) in UTF-8 encoded files is
known to cause problems for some text editors and older browsers.
You may want to consider avoiding its use until it is better supported.
I've opened them in Notepad, and there are no unusual characters or symbols at the beginning of any of them. I'm getting the same validation errors with both default templates that came with PP1.6 (simple and horizon), and I've never opened any of those files since downloading them. Using my template, this last round of validations gave these results: - index.php (image_template.html) - failed with the same original error. - index.php?x=about (about_template.html) - passed but with same BOM warning. - index.php?x=browse (browse_template.html_ - passed but with same BOM warning. - index.php?x=archivecalendar (archivecalendar_template.html) - passed but with same BOM warning. I really don't know what else to do to fix the validation error I'm getting with the image_template.html. I can't delete what I can't find.
|
|
#8
|
||||
|
||||
|
Turn all your addons off or temporarily rename the addons folder and see if that corrects the issue.
__________________
Pixelpost Documentation | Visual Pixels | My Addons | Transition Bottlerocket Fund |
|
#9
|
||||
|
||||
|
Thanks for the suggestion.
I tried both - renamed the folder and revalidated, then tried turn them all off in the admin panel and revalidated. Unfortunately, I got the same error for the page that uses the image_template.html both times. I tried turning back on only the addons that come as default with 1.6 - no change. ![]() I really do appreciate all the suggestions from both of you in trying to help me track down and resolve this issue. |
|
#10
|
||||
|
||||
|
Maybe your text file editor added some garbage chars to the files?
PS Check if it doesnt add "BOM" (Byte Order Mark) for UTF8 file recognition!!! http://en.wikipedia.org/wiki/Byte_Order_Mark |
| Post Reply |
| Thread Tools | |
|
|