Weird HTML Validator behaviour

Found a bug? Tell us!!
Post Reply
pauly
Regular
Posts: 5
Joined: Mon Sep 18, 2006 3:05 am

Weird HTML Validator behaviour

Post by pauly »

Heya,

I've been having troubles getting the validator to work properly for me. whenever I preview a post, old or new, all I ever see is a red-bordered box at the bottom of my post, about 10 pixels high & the width of the container layer, with nothing in it.

I've tried both IE6 and FF1.5. I've tried moving the validator event up and down the list. Tried disabling other event pplugins, too. Tried different templates; tried changing what spec it was checking against; even went to a clean install (because of other problems) and imported my posts by hand.... and still, the same problem.

It seems, based on other people's posts, that this thing is actually supposed to be large and contain content. I'm at a total loss... guessing theres some either ridiculously complex or ridiculously simple solution.

Any thoughts?
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

Tempates that aren't table-based have some problems with the preview. Sometimes it's minor, sometimes it's not. If you "view source", is the article there, just having trouble with display/CSS? If you try a different template, does the result change?
Judebert
---
Website | Wishlist | PayPal
pauly
Regular
Posts: 5
Joined: Mon Sep 18, 2006 3:05 am

Post by pauly »

heya judebert, thanks for your time. yes... ive tried about a dozen different templates, including all the default-ish ones, to no avail. I also tried to look through the source code for any sort of data (assuming that maybe it was in a DIV and that it was being clipped). And here is the box:

Code: Select all

<div style="border: 1px solid red; margin: 10px; padding: 5px; "><div></div></div>
... with a completely empty div inside. I can't help but think that this has something to do with the server side, but i dont even know what to ask my webhost to fix.
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

Nope, not a CSS problem. Can you check your error logs? I was definitely expecting something in the div, and I wonder if a PHP error turned it into a blank page.
Judebert
---
Website | Wishlist | PayPal
pauly
Regular
Posts: 5
Joined: Mon Sep 18, 2006 3:05 am

Post by pauly »

there is an error logfile in the serendipity root, but it does not have anything added to it. Might there be a log elsewhere?
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

Yup. I'm thinking of the Apache and PHP error logs. Different hosting providers put them in different places, but generally they're available from your provider's login page. (Like OPS for PowWeb users.)

You may need to ask your provider where they are.
Judebert
---
Website | Wishlist | PayPal
pauly
Regular
Posts: 5
Joined: Mon Sep 18, 2006 3:05 am

Post by pauly »

Heya,

Sorry for the huge delay. As it turns out, my webhost is incompetent ;) They don't seem to log the sorts of errors that are actually meaningful. I've given up on this problem, and will return to it in 1/2 a year when i switch to a new host. Thanks for your help though, as this is the straw that's broken the camel's back.
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

I'd call that a good reason to leave a hosting company. No logs? What are they thinking?
Judebert
---
Website | Wishlist | PayPal
Dr. Love
Regular
Posts: 79
Joined: Wed Jun 21, 2006 5:29 pm
Location: Düsseldorf, Germany
Contact:

Post by Dr. Love »

Hello judebert,

exact the same problem here, also no access to the PHP-Errorlogs, only the Apache-Logfiles are accessable for me. I cannot memorize any of my former and actual hosters (nor Strato, Hosteurope or Domainfactory) with access to the php errorlogs for shared-hosting-accounts.

On a local Ubuntu server the errorlog does't list any error at the "red boxed" request. Both my hosts run PHP 5.2, maybe this is the problem? Maybe the validator.w3c.org has changed its output format?

Is there any new information for this issue in the meantime? Or does anybody know another HTML-Validator Plugin, perhaps one checking the syntax locally or via an API, not via a hardcoded pattern-matching?




I found a first bug ($eventData is an Array), but that isn't the whole problem:
Original:

Code: Select all

$data = '<html><head><title>s9y</title></head><body><div>' . $eventData . '</div></body></html>';
Better:

Code: Select all

$data = '<html><head><title>s9y</title></head><body><div>' . $eventData['body'] . '</div></body></html>';
There is another problem, I could not locate at the moment. I think the $REQUEST_STRING may be broken.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

I believe the HTML Validator does simply no longer work since validator.w3.org made some changes.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Dr. Love
Regular
Posts: 79
Joined: Wed Jun 21, 2006 5:29 pm
Location: Düsseldorf, Germany
Contact:

Post by Dr. Love »

ahh, I see. But it could never been working, since $eventData is an array. Or were there any changes in the API concerning this? Just wondering...

Any alternative for checking the HTML code before posting it? As yet I send my whole page to the validator after publishing the post.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

You are right, $eventData is simply wrong. I only know it worked at some point, but then the URL or API changed in a strange way...I never really looked into it then.

I just committed your eventData patch, couldn't hurt ;)

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Dr. Love
Regular
Posts: 79
Joined: Wed Jun 21, 2006 5:29 pm
Location: Düsseldorf, Germany
Contact:

Post by Dr. Love »

Nice :) wouldn't hurt...

Perhaps I'll look deeper into the PlugIn Code, if I get the time.

Greets, Dr. Love
Dr. Love
Regular
Posts: 79
Joined: Wed Jun 21, 2006 5:29 pm
Location: Düsseldorf, Germany
Contact:

Post by Dr. Love »

hmm, i did some research and found a PEAR-class (Services_W3C_HTMLValidator), which uses the SOAP-API of the W3C validator. It could replace the fragile Regex-Parser of the actual Plugin, which I dont want to touch in any way.

Are such PEAR-classes compatible with S9Y? Im mean in two ways: from the license point of view and the contribution point of view (publishable with the plugin)?

Greets, Dr. Love
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

s9y plugins can be GPL licensed, so that's no big deal - as long as the plugin does not ship with s9y distribution (which is BSD).

Most PEAR classes are BSD or LGPL, so that's fine.

Regards,
Gargvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply