[Zope-CMF] Re: survey: zope 2.7 syntax errors with TAL statments over multiple lines

Larry J. C. Prikockis larry_prikockis at natureserve.org
Thu Jan 8 14:29:41 EST 2004


On Wed, 31 Dec 2003 10:36:33 -0500, Gerry Kirk wrote:

> Is anyone else getting this problem? I'm surprised there aren't other 
> people posting this problem... I always seem to get the weird ones, I guess.
> 
> Any time a TAL statement extends over multiple lines, I get a syntax 
> error, like this one:
> 
> TAL.TALDefs.TALError: Python expression error: invalid syntax (Python 
> expression "test( no_types == 1 , 'Add New ' + types[0].Title() , 'Add 
> New Item')", line 1) in expression "python:test( no_types == 1\r\n , 
> 'Add New ' + types[0].Title()\r\n , 'Add New Item')", at line 111, column 29
> 
> It's a real pain, as there are a number of lines like this in several 
> products. I can only make it go away by putting everything on one line.
> 
> I did file a bug at zope.org, but no response...
> 
> - Gerry

well, consider me a second data point on this problem.... I'm in the
process of migrating a Zope 2.6.2/CMF1.3.1/Plone1.0.5 site to the latest
'n greatest of each of those products.    I've currently upgraded Zope to
the latest 2.7 beta and kept the rest the same.

I'm experiencing the same sort of problem as you - e.g., these lines
(which happen to be from the epoz_toolbox.pt):

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"
          tal:define="charset here/portal_properties/site_properties/default_charset; dummy python:request.RESPONSE.setHeader('Content-Type', 'text/html;;charset=%s' % charset)"
          tal:attributes="content string:text/html;;charset=${charset}" />

produced an error before I moved the 2 tal:define clauses up onto one
line.

very weird




More information about the Zope-CMF mailing list