Zope 2.7.2 breaks Plone 2.0.3 login_form
I've just installed Zope 2.7.2 and attempted to browse to my Plone 2.0.3 /manage form. Instead of getting the expected page, I get: Error Type RuntimeError Error Message FS Page Template login_form has errors: Compilation failed. <pre>TAL.HTMLTALParser.NestingError: Open tags <html>, <body>, <div>, <script> do not match close tag </a>, at line 63, column 188</pre> Looking inside ./CMFPlone/skins/plone_forms/login_form.pt, this relates to the '<' of the '</a> tag: <script type="text/javascript"> // <![CDATA[ if (cookiesEnabled && !cookiesEnabled()) { document.writeln('<div class="portalMessage"><img src="info.gif">Cookies are not enabled. You can not log in if they are turned off. <a href="enabling_cookies">How to enable cookies</a>.</div>'); } // ]]> </script> One workaround was to comment out this chunk of script. Another one was to revert back to Zope 2.7.1. :-) I have no idea if this is Zope tightening up and rejecting an incorrect Plone template, or an introduced bug in Zope which is rejecting a correct Plone template. Has anyone else seen this, or is it a peculiarity of my site? PJDM -- Peter Mayne Spherion Technology Solutions Canberra, ACT, Australia "You're given the form, but you have to write the sonnet yourself. What you say is completely up to you." - Mrs. Whatsit
Peter Mayne wrote:
I've just installed Zope 2.7.2 and attempted to browse to my Plone 2.0.3 /manage form.
Instead of getting the expected page, I get:
Error Type RuntimeError Error Message FS Page Template login_form has errors: Compilation failed. <pre>TAL.HTMLTALParser.NestingError: Open tags <html>, <body>, <div>, <script> do not match close tag </a>, at line 63, column 188</pre>
Looking inside ./CMFPlone/skins/plone_forms/login_form.pt, this relates to the '<' of the '</a> tag:
<script type="text/javascript"> // <![CDATA[ if (cookiesEnabled && !cookiesEnabled()) { document.writeln('<div class="portalMessage"><img src="info.gif">Cookies are not enabled. You can not log in if they are turned off. <a href="enabling_cookies">How to enable cookies</a>.</div>'); } // ]]> </script>
One workaround was to comment out this chunk of script. Another one was to revert back to Zope 2.7.1. :-)
I have no idea if this is Zope tightening up and rejecting an incorrect Plone template, or an introduced bug in Zope which is rejecting a correct Plone template.
Has anyone else seen this, or is it a peculiarity of my site?
Yes, the very same error here. I think this is caused by the Hotfix_2004-07-13 which is included in 2.7.2 and fixes a security bug in Page Templates. I didn“t have the time to investigate thoroughly, so used the same workaraound like you. Andreas
On Fri, 23 Jul 2004 09:47:25 +1000, Peter Mayne <petermayne@ap.spherion.com> wrote:
<script type="text/javascript"> // <![CDATA[ if (cookiesEnabled && !cookiesEnabled()) { document.writeln('<div class="portalMessage"><img src="info.gif">Cookies are not enabled. You can not log in if they are turned off. <a href="enabling_cookies">How to enable cookies</a>.</div>'); } // ]]> </script>
One workaround was to comment out this chunk of script. Another one was to revert back to Zope 2.7.1. :-)
And still another is to split your string literals where they look like markup, because even CDATA marked sections aren't meant to protect you from everything. Try changing the line with the </a> to href="enabling_cookies">How to enable cookies<' + '/a>.<' + '/div>'); and the problem should go away.
I have no idea if this is Zope tightening up and rejecting an incorrect Plone template, or an introduced bug in Zope which is rejecting a correct Plone template.
This is Zope no longer duplicating a module from Python's standard library, and the Python module is slightly stricter than the version previously in Zope. I consider this a bug in Plone's template, and it can be trivially fixed there. It is unfortunate that the looser version of the HTMLParser module was used for so long; that was an oversight on my part. It should have been removed from Zope 2 the minute we required Python 2.3.x. This is *not* related to the recent hotfix, as Andreas Kaiser suggests. The issues related to that were all related to the hotfix product being loaded after some templates were compiled. -Fred -- Fred L. Drake, Jr. <fdrake at gmail.com> Zope Corporation
Fred Drake wrote at 2004-7-23 10:38 -0400:
... And still another is to split your string literals where they look like markup, because even CDATA marked sections aren't meant to protect you from everything.
They are meant to protect you from anything that is not "]]>"... The current TAL parser behaviour is a bug and should be fixed... Artificially splitting string literals is extremely ugly.
... This is Zope no longer duplicating a module from Python's standard library, and the Python module is slightly stricter than the version previously in Zope. I consider this a bug in Plone's template, and it can be trivially fixed there.
Maybe, you reread the SGML specification for elements with CDATA content and the XML specification concerning CDATA sections. I am convinved that they indicate a bug in the parser and not in Plone's template... -- Dieter
participants (4)
-
Andreas Kaiser -
Dieter Maurer -
Fred Drake -
Peter Mayne