Strange behavior with Zope 2
I just upgraded to Zope 2.0.0 and move my site to it. It seems that sometimes Zope determines mime type of document errorenously. Pages worked fine with Zope 1. Html files are some times treated as text/plain. This happens when I have defined new standard_html_header method for a folder (but not every folder that have it's own standard_html_header and footer). F.e. dtml-source: <!--#var standard_html_header--> <IMG SRC="space_gif" ALT=""> <!--#var standard_html_footer--> renders to page that looks like: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html lang="fi"> <head> ...etc... Page Info says: Location: http://xcalibur.cc.tut.fi/Zope/Pelit/476/index_html File MIME Type: text/plain Should I do something differetly with Zope 2 is this bug? -- Petri Lankoski Cancel my subscription to the Resurrection kreivi@iki.fi Send my credentials to the House of Detention http://www.iki.fi/~kreivi/ doors PGP: http://www.iki.fi/~kreivi/pgp.txt
On Fri, 3 Sep 1999, Petri Lankoski wrote:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html lang="fi"> Well, what about <html>? As far as I know, <html> doesn't take a "lang" attribute, right?
Andreas -- Andreas Kostyrka | andreas@mtg.co.at phone: +43/1/7070750 | phone: +43/676/4091256 MTG Handelsges.m.b.H. | fax: +43/1/7065299 Raiffeisenstr. 16/9 | 2320 Zwoelfaxing AUSTRIA
HTML takes a lang attribute, as does <P> and some others, I believe. It's intended to signal the renderer (browser) that some language specific characters might be coming up. The codes for the respective languages are spelled out in RFC 1766. In addition, the doctype/dtd is incomplete. There is a chunk of it missing, after the 'EN'. Basically, you have to also include where to find the DTD if you are going to specify which DTD to use...most editors that I've seen, that put this in by default, don't do it correctly. For HTML 4.0 Transitional, it should read: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> I'm not sure if this is the solution, and I'm a total Zope rookie, but if it's going to be looking for the spec, it's going to need to know where to find it. The strict HTML4 spec is at: http://www.w3.org/TR/REC-html40/sgml/dtd.html Hope this helps. - John ----- Original Message ----- From: Andreas Kostyrka <andreas@mtg.co.at> To: Petri Lankoski <count@cs.tut.fi> Cc: <zope@zope.org> Sent: Friday, September 03, 1999 9:12 AM Subject: Re: [Zope] Strange behavior with Zope 2
On Fri, 3 Sep 1999, Petri Lankoski wrote:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html lang="fi"> Well, what about <html>? As far as I know, <html> doesn't take a "lang" attribute, right?
Andreas -- Andreas Kostyrka | andreas@mtg.co.at phone: +43/1/7070750 | phone: +43/676/4091256 MTG Handelsges.m.b.H. | fax: +43/1/7065299 Raiffeisenstr. 16/9 | 2320 Zwoelfaxing AUSTRIA
_______________________________________________ Zope maillist - Zope@zope.org http://www.zope.org/mailman/listinfo/zope
(To receive general Zope announcements, see: http://www.zope.org/mailman/listinfo/zope-announce
For developer-specific issues, zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )
John Turner writes:
In addition, the doctype/dtd is incomplete. There is a chunk of it missing, after the 'EN'. Basically, you have to also include where to find the DTD if you are going to specify which DTD to use...most editors that I've seen, that put this in by default, don't do it correctly.
That same DOCTYPE header works fine in standard_html_header that is in / of zope. The html in pages should be OK. validator.w3.org accepts those pages as a valid html (served with zope 1). Problem seemed to be that _sometimes_ zope don't understant that html lang parameter. After I removed that some pages started to work. Intresting is that my main page work and there I set same way lang="fi" -- Petri Lankoski Sitting here now in this bar for hours kreivi@iki.fi Strange men rent strange flower http://www.iki.fi/~kreivi/ sisters of mercy PGP: http://www.iki.fi/~kreivi/pgp.txt
For HTML 4.0 Transitional, it should read:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
I'm not sure if this is the solution, and I'm a total Zope rookie, but if it's going to be looking for the spec, it's going to need to know where to find it.
The strict HTML4 spec is at: http://www.w3.org/TR/REC-html40/sgml/dtd.html
Hope this helps.
- John
----- Original Message ----- From: Andreas Kostyrka <andreas@mtg.co.at> To: Petri Lankoski <count@cs.tut.fi> Cc: <zope@zope.org> Sent: Friday, September 03, 1999 9:12 AM Subject: Re: [Zope] Strange behavior with Zope 2
On Fri, 3 Sep 1999, Petri Lankoski wrote:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html lang="fi"> Well, what about <html>? As far as I know, <html> doesn't take a "lang" attribute, right?
Andreas -- Andreas Kostyrka | andreas@mtg.co.at phone: +43/1/7070750 | phone: +43/676/4091256 MTG Handelsges.m.b.H. | fax: +43/1/7065299 Raiffeisenstr. 16/9 | 2320 Zwoelfaxing AUSTRIA
_______________________________________________ Zope maillist - Zope@zope.org http://www.zope.org/mailman/listinfo/zope
(To receive general Zope announcements, see: http://www.zope.org/mailman/listinfo/zope-announce
For developer-specific issues, zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )
participants (3)
-
Andreas Kostyrka -
John Turner -
Petri Lankoski