Pixelpost

Authentic Photoblog Flavour


Go Back   Pixelpost Forum > SUPPORT / INFORMATION > Pixelpost Help

Post Reply
 
Thread Tools
  #1  
Old 04-17-2007, 11:10 AM
dhdesign's Avatar
dhdesign Offline
pixelpost guru
 
Join Date: Mar 2007
Location: Ohio
Posts: 431
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
I switched to the simple template, then the horizon template, and am getting the same validation error for both of them as well.

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???
Reply With Quote
  #2  
Old 04-17-2007, 11:12 AM
Dkozikowski's Avatar
Dkozikowski+ Offline
Team Pixelpost
 
Join Date: Oct 2005
Posts: 1,855
Send a message via AIM to Dkozikowski
A link to your site would be helpful
Reply With Quote
  #3  
Old 04-17-2007, 11:16 AM
dhdesign's Avatar
dhdesign Offline
pixelpost guru
 
Join Date: Mar 2007
Location: Ohio
Posts: 431
Here's the link to the 1.6 install: http://www.kpimages.net/index.php
Reply With Quote
  #4  
Old 04-17-2007, 12:05 PM
austriaka's Avatar
austriaka+ Offline
Team Pixelpost
 
Join Date: Nov 2006
Location: Germany
Posts: 1,175
Send a message via ICQ to austriaka Send a message via AIM to austriaka
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">
you see it when I wrap PHP tags around it:
PHP Code:
&#65279;<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
   
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
Besides you should remove the meta charset <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
Pixelpost is UTF-8 compliant, you should not change that

KArin
__________________
Uh!log Photoblog
My Addons
Reply With Quote
  #5  
Old 04-17-2007, 12:31 PM
dhdesign's Avatar
dhdesign Offline
pixelpost guru
 
Join Date: Mar 2007
Location: Ohio
Posts: 431
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.
Reply With Quote
  #6  
Old 04-17-2007, 12:55 PM
austriaka's Avatar
austriaka+ Offline
Team Pixelpost
 
Join Date: Nov 2006
Location: Germany
Posts: 1,175
Send a message via ICQ to austriaka Send a message via AIM to austriaka
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.
__________________
Uh!log Photoblog
My Addons
Reply With Quote
  #7  
Old 04-17-2007, 02:56 PM
dhdesign's Avatar
dhdesign Offline
pixelpost guru
 
Join Date: Mar 2007
Location: Ohio
Posts: 431
Quote:
Originally Posted by austriaka View Post
Do you see the strange character in the template files too?
No, there are no characters before the opening < for the doctype code.
Quote:
Originally Posted by austriaka View Post
Do you have a line break or something like that there?
No, there is no line break before the doctype code.
Quote:
Originally Posted by austriaka View Post
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).
Already did that. The 'PS/' in my previous post explains why. It's been changed back to UTF8.
Quote:
Originally Posted by austriaka View Post
Try converting everything to UTF-8 and delete everything before the first "<".
I've already converted all of the template files and index.php to UNICODE UTF-8 encoding in my text editor, reuploaded to the server, and revalidated, no change. There is nothing before the first "<" in the template files.
Quote:
Originally Posted by austriaka View Post
Try to delete both lines before <head> and retype it by hand.
Did that - no change.
Quote:
Originally Posted by austriaka View Post
Try a different editor and a fresh download.
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 made sure to set the preferences in my text editor NOT to insert a BOM at the beginning of the file. None of the files I've edited (template files or PP index.php) have any weird characters at the beginning of them. The template files all start with '<!DOCTYPE' and the index.php file starts with '<?php'.

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.
Reply With Quote
  #8  
Old 04-17-2007, 03:04 PM
Dkozikowski's Avatar
Dkozikowski+ Offline
Team Pixelpost
 
Join Date: Oct 2005
Posts: 1,855
Send a message via AIM to Dkozikowski
Turn all your addons off or temporarily rename the addons folder and see if that corrects the issue.
Reply With Quote
  #9  
Old 04-17-2007, 03:26 PM
dhdesign's Avatar
dhdesign Offline
pixelpost guru
 
Join Date: Mar 2007
Location: Ohio
Posts: 431
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.
Reply With Quote
  #10  
Old 04-17-2007, 09:19 PM
GeoS's Avatar
GeoS+ Offline
Team Pixelpost
 
Join Date: Apr 2005
Location: Warsaw, Poland
Posts: 3,613
Send a message via ICQ to GeoS Send a message via Skype™ to GeoS
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
__________________
photoblog | portfolio | addons | Donate
Reply With Quote
Post Reply


Thread Tools




All times are GMT. The time now is 08:12 AM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd. | Style Design: d3 designs