[Zope-dev] TAL i18n breakage in 2.7

Myroslav Opyr myroslav at zope.net.ua
Tue Feb 24 18:42:03 EST 2004


Myroslav Opyr wrote:

> I always commented all asserts introduced in newer Zopes out. However 
> I'm struggling with assertion "TALInterpreter, line 490, in 
> do_endI18nContext":
>    def do_endI18nContext(self, notused=None):
>        self.i18nContext = self.i18nContext.parent
>        assert self.i18nContext is not None
> Meaning None was produced somewhere (maybe even Translation Service) 
> and TALInterpreter does not expect this case to be.

I found the offending part in the ZPT that caused the abovementioned 
assertion.

I have a pagetemplate that uses master macro from main template, then 
the main template includes the other template (portlet) that eposes slot 
to be optionally overriden in template using it (main in my case).

test.pt
    <... metal:use-macro=...>
        main.pt metal:define-macro
            master
                <... metal:use-macro=...>
                    portlet.pt metal:define-macro
                        portlet
 >                           <... define-slot=...>
                               /default slot content/

As soon as I remove the level marked with > my page renders fine with no 
exception. If I want to expose flexibility of my portlet with that slot, 
the whole construct breaks with exception :(

Any hints appreciated,

Regards,

m.
-- 
Myroslav Opyr
zope.net.ua <http://zope.net.ua/> ° Ukrainian Zope Hosting
e-mail: myroslav at zope.net.ua <mailto:myroslav at zope.net.ua>




More information about the Zope-Dev mailing list