Where did this little <!DOCTYPE html> come from?

Out of nowhere, <!DOCTYPE html> showed up at the very top of my Chris Abraham Personal Plone Website. Anyone know why? The issue's been happening only recently. It seems like it stops right after I pack the ZODB. Here's my deets that I can think of from the server.

  • Connected through CloudFlare CDN with HTTPS
  • Plone (4309)
  • CMF 2.2.8
  • Zope 2.13.22
  • Python 2.7.5 (default, Nov 20 2015, 02:00:19) [GCC 4.8.5 20150623 (Red Hat 4.8.5-4)]
  • PIL 2.6.1 (Pillow)

I really don't want to be a bother and don't know where else to go. I came back to Plone because I love this template/theme so unless there's a Plone Classic Theme for Plone 5, I might just stay here. Thanks in advance for any help or insight or benefit of your experience you can give.

I was into Zope in the late 90s and Plone in the early 00s. I had my company and my own vanity site on Plone back in the day. A year or so ago, I got nostalgic and went through the inconvenience of finding myself a hosting company that would even allow a Plone install. I have been doing OK and getting through the bugs and issues.

Additional information: I very recently updated Plone to be way more permissive for inline page coding so that I could embed YouTube videos and embedded content and even embedded Slideshare stuff. Since I don't allow users (there's only two of them, both me) I don't need that sort of limitation--but maybe I took permissive too far, resulting in the <!DOCTYPE html> glyph.

ahem, I don't know much about Plone and nothing about 4.3. This said, I have looked a bit at your site and it's disturbing (the html, not your content :-)).
In most page the


section is empty and the part that should go normally in the


is at the body beginning. Strangely, there is one page that bucks the trend, the one where you have your price and conditions ('menus'). That's also the only one that don't seem to have google analytics. Strangely also, google analytics javascript is included 2 times in your other pages. That's not normal, I have looked a bit at other sites, found one that used google analytics, it's included only one time. I have no idea if it's related, it seems doubtful a javascript library could scramble pages like that.
Maybe you could try to remove google analytics to see if it changes something ? that's a total shot in the dark, but what can be done just looking at the site output anyway ?

Maybe you could try to check if Javascript really scrambles your site by using a tool like wget or curl and looking at the output in a text editor... but wait, I can do it.
wget http://chrisabraham.com
Yes ! Plone output looks much more normal looked at using vi !


section is not empty. That's really something happening after Plone transmits data, ie Javascript.
You need to disable javascript libraries one at a time until you have found the culprit. I'll begin by the duplicated Google Analytics library if I were you.

That is a standard HTML doctype declaration. Is it a problem? It's not new.... it's been in Plone since at least 2.5


What he means is that 'doctype' is shown in the top (in text).

Because of this:


You should consider updating your theme (or Plone version)

PS: the mobile test also shows that the analytics do not load.

Simply look at the HTML-Source - better not use firebug or similar.
Seems like an error in a maybe copy & pasted customized template:
& l t ; !DOCTYPE html>
(i put spaces at the beginning entity reference - otherwise it would have looked correctly)
is surely not a standard HTML-Doctype-declaration.47

I will really work to try to fix my terrible issue with Google Analytics. Thank you. Yes, I know, I am not mobile friendly. I really need to upgrade but I love this theme/template so much. Thank you.

I'm actually an expert in basic HTML... I am asking why it renders visually when you visit the page. I don't think I made that at all obvious but I didn't expect nobody to actually go visit the page before responding :slight_smile:

Do you mean "anybody" ? :slight_smile:

… but you don't care that your google rating will drop VERY much because of it ?

Anyway: your site is in pretty bad shape, looks like you are loading google analytics many times, and something is messed up with Jquery … You could consider adding a new plone site on the same zope and install the same add-ons and see what happens…

I don't know what to say. My buddy who has some experience with Zope and Plone says that my site is a little like a turducken: there's an HTML page inside of an HTML page. The only things I have done recently has been to try to turn off enough forbidden HTML tags so that I could embed a "Buy Me a Coffee" button on the site, a button which requires embed and iframe and all that sort of thing. Is there something I might have removed that could have done that? Is it also possible that putting the site behind the Cloudflare CDN for https services SSL could have done this? Has anyone had this sort of experience?

looking again at your page this time using Chrome. Arghh. It's not the same as what appears with Firefox inspector. Now I understand why with wget I was seeing something much more normal. With wget and Chrome the order of data seems normal. However, with Chrome it's immediately obvious what is wrong. Mind you, it could be seen also with wget but I missed it somehow. With Firefox your little problem confuses completely the inspector and the browser scramble the server output.

So it's absolutely not a Javascript problem.

your server should send

<!DOCTYPE html>

at the beginning of your html page
However what is sent by Plone is

&lt;!DOCTYPE html>

that's not the same :slight_smile: even if your browser interprets it and makes it appear the same. Sorry for the misunderstanding.

Now for the cause ? Cloudflare seems very unlikely to me, what could you have changed ? caching parameters ? and why some pages could be correct ?

You coffee button ? it's just javascript isn't it ? I have just concluded that it can't be javascript, the server output is wrong.

It seems that the only page not having the problem is the page not having an image.
You could try to add some photo to your 'menus' page to see if the DOCTYPE appears at this point.