serious problem with !doctype

2 views
Skip to first unread message

eternal243

unread,
Jun 3, 2009, 5:40:07 PM6/3/09
to habari-users
well, i was working on my site and had some real trouble figuring out
what was causing layout-problems in internet explorer for me.

in the end i found the problem but i don't have any clue why it
happens or how to solve it.

what happens is that if i view the source on any page of my site the
doctype shows <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> everywhere,
except when i'm viewing a single-entry page.

if i do view a single-entry page and then bring up the source i get
this <!HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://
www.w3.org/TR/html4/loose.dtd">

As you can see the DOCTYPE is missing within the source if i view a
single-entry page but not on a multiple-entry page, front page, search
page, archive page or any other page on the site.

please help me solve this problem, i've never run into anything like
this before. i'm using a modified k2-theme on my site.

Arthus Erea

unread,
Jun 3, 2009, 5:42:11 PM6/3/09
to habari...@googlegroups.com
Hi,

Sounds like you might have modified your entry.single.php template.

Open your entry.single.php template and ensure it either:
a) has the proper DOCTYPE at the top or
b) includes "header.php"

eternal243

unread,
Jun 3, 2009, 5:45:34 PM6/3/09
to habari-users
Thanks for fast reply, I have modified my entry.single.php file a
little bit but yes, I do have <?php $theme->display ( 'header' ); ?>
included at the top of the page.

Chris J. Davis

unread,
Jun 3, 2009, 5:46:21 PM6/3/09
to habari...@googlegroups.com
Have you checked header.php to make sure that there isn't anything
strange going on?

Arthus Erea

unread,
Jun 3, 2009, 5:46:41 PM6/3/09
to habari...@googlegroups.com
Okay, can you give this a try:
1) Rename entry.single.php to something.php
2) Copy the stock entry.single.php template from the system K2
directory into your custom theme

eternal243

unread,
Jun 3, 2009, 5:54:50 PM6/3/09
to habari-users
Actually i just switched to the stock K2 theme and got the same
problem, i then switched to both Mzingi and Charcoal themes and got
the same problem yet again, !doctype gets broken on single-entry
pages.

I'm using habari 0.6.2 btw

Arthus Erea

unread,
Jun 3, 2009, 5:56:09 PM6/3/09
to habari...@googlegroups.com
Okay, can you try deactivating your plugins, one by one?

See if that fixes the issue. If so, tell us which plugin fixed it and
I'll look into it.

Otherwise, it might be a core issue.

eternal243

unread,
Jun 3, 2009, 6:10:38 PM6/3/09
to habari-users
that solved the problem, the faulty plugin was:

Spam HoneyPot 1.0.1 by Sean Coates
Entraps spammers with a honeypot comment field

It is one of the few plugins i have installed, although i couldn't
find much information on it before i installed it, i guess it hasn't
been updated for awhile.

rick c

unread,
Jun 3, 2009, 9:55:59 PM6/3/09
to habari-users
If it was the spamhoneypot plugin, that implies there is a problem
with the tokenizer, since all the honeypot does is search for a
comment form and add the honeypot to it. There should be no other
changes made in the page output.

Rick

Matthias Bauer

unread,
Jun 4, 2009, 5:29:10 AM6/4/09
to habari...@googlegroups.com
On 04.06.2009 03:55, rick c wrote:
> If it was the spamhoneypot plugin, that implies there is a problem
> with the tokenizer, since all the honeypot does is search for a
> comment form and add the honeypot to it. There should be no other
> changes made in the page output.

HTMLTokenSet's behavior for re-serializing statements seems to be wrong.
I'll whip up a patch and add testcases.

-Matt

Matthias Bauer

unread,
Jun 4, 2009, 6:30:48 AM6/4/09
to habari...@googlegroups.com
On 03.06.2009 23:40, eternal243 wrote:

> what happens is that if i view the source on any page of my site the
> doctype shows<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
> Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> everywhere,
> except when i'm viewing a single-entry page.
>
> if i do view a single-entry page and then bring up the source i get
> this<!HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://
> www.w3.org/TR/html4/loose.dtd">
>
> As you can see the DOCTYPE is missing within the source if i view a
> single-entry page but not on a multiple-entry page, front page, search
> page, archive page or any other page on the site.

This should be fixed by the changes from [3619].

-Matt

rick c

unread,
Jun 4, 2009, 7:05:51 AM6/4/09
to habari-users
Matt,

You ROCK!

Rick

David

unread,
Jun 5, 2009, 11:33:08 AM6/5/09
to habari-users
Agree with Rick. Hate to reply with a simple "me too", but watching
this thread's investigation and resolution has been awesome. There's
nothing better than developers who care about their product.

--David

On Jun 4, rick c <rickcock...@gmail.com> wrote:
> Matt,
>
> You ROCK!
Reply all
Reply to author
Forward
0 new messages