[Zope3-dev] Weird TAL code path?

Sidnei da Silva sidnei at awkly.org
Thu Oct 21 08:48:44 EDT 2004


On Thu, Oct 21, 2004 at 03:11:31AM -0400, Fred Drake wrote:
| On Thu, 21 Oct 2004 00:12:24 -0200, Sidnei da Silva <sidnei at awkly.org> wrote:
| > I've got this error on a page template, and I'm not sure why. I don't
| > see why it worked before, and it doesn't make much sense to me why
| > this template is different than others. I can send the ZPT that caused
| > this, though it has an intrincate set of dependencies, probably
| > unreproducible with lots of work *wink*
| 
| Clearly the problem involves the insertion of structure.  ;-)  I'd
| really like to get a test case for this; if you can manage the time to
| cut down the templates that are involved and possibly write a
| functional test, I'd love to get that from you.

There we go, easier than I thought:

    <div tal:replace="structure string:bla"
         tal:attributes="name non_existing">
    </div>

It only happens if tal:attributes doesn't find the variable. Of course
the code above doesn't make sense, because it's setting an attribute
on a tag that's going away *wink*.

I'd love to write a functional test, but the pain of my last incursion
into writing a test for page templates still hurts.

-- 
Sidnei da Silva <sidnei at awkly.org>
http://awkly.org - dreamcatching :: making your dreams come true
http://www.enfoldsystems.com
http://plone.org/about/team#dreamcatcher

>>> Internal error in fortune program:
>>>	fnum=2987  n=45  flag=1  goose_level=-232323
>>> Please write down these values and notify fortune program administrator.


More information about the Zope3-dev mailing list