RestrictedDTMLMixin.__new__(Rtd) is not safe, use TemplateDict.__new__()

"Andreas Jung" <[email protected]> Wed, 04 Jan 2017 13:56:29 +0100
Newsgroups gmane.comp.web.zope.devel
Message-ID <[email protected]>
I am currently porting a Zope 2.7 application to Zope 2.13.

I receive the following error while rendering some persistent ZPTs... how to deal with that?


2017-01-04 13:15:13 ERROR Zope.SiteErrorLog 1483532113.350.552179133409 http://10.162.62.85:12080/error_log/manage_main
Traceback (innermost last):
  Module ZPublisher.Publish, line 138, in publish
  Module ZPublisher.mapply, line 77, in mapply
  Module ZPublisher.Publish, line 48, in call_object
  Module Shared.DC.Scripts.Bindings, line 322, in __call__
  Module Shared.DC.Scripts.Bindings, line 359, in _bindAndExec
  Module Products.PageTemplates.PageTemplateFile, line 130, in _exec
  Module Products.PageTemplates.PageTemplate, line 89, in pt_render
  Module zope.pagetemplate.pagetemplate, line 113, in pt_render
  Module zope.tal.talinterpreter, line 271, in __call__
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 531, in do_optTag_tal
  Module zope.tal.talinterpreter, line 513, in no_tag
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 742, in do_insertStructure_tal
  Module Products.PageTemplates.Expressions, line 218, in evaluateStructure
  Module zope.tales.tales, line 696, in evaluate
   - URL: manage_main
   - Line 1, Column 0
   - Expression: <PathExpr standard:'context/manage_page_header'>
   - Names:
      {'container': <SiteErrorLog at /error_log>,
       'context': <SiteErrorLog at /error_log>,
       'default': <object object at 0x30026b58>,
       'here': <SiteErrorLog at /error_log>,
       'loop': {},
       'nothing': None,
       'options': {'args': ()},
       'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0x315f5dc4>,
       'request': <HTTPRequest, URL=http://10.162.62.85:12080/error_log/manage_main>,
       'root': <Application at >,
       'template': <PageTemplateFile at /error_log/main>,
       'user': <User 'aj'>}
  Module zope.tales.expressions, line 217, in __call__
  Module Products.PageTemplates.Expressions, line 155, in _eval
  Module Products.PageTemplates.Expressions, line 105, in render
  Module Products.PageTemplates.ZRPythonExpr, line 67, in call_with_ns
TypeError: RestrictedDTMLMixin.__new__(Rtd) is not safe, use TemplateDict.__new__()

_______________________________________________
Zope-Dev maillist  -  [email protected]
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )
signature.asc (application/pgp-signature, 618 B)
-----BEGIN PGP SIGNATURE-----

iQGUBAEBCgAGBQJYbPD+AAoJEADcfz7u4AZjDqwLvA3fLlF8siRd9D9HTOuuHhqB
hT/OpAYibP+T10+Vehi4mh9NWvJzeL+2LjTQ3N6XCYnxaoEYFqzn25RbKRxcLxCG
vlebHUpRUIV1VuqPUEWjLozjm4ajPoksh5VcpGqozUpN4Jm2aUzPyyJcmBzwvpLS
Yu6VBkQLRuf4xZ3P6s23Xns3LSHOi9GJKwkS2DOHcIVlU8pfGDLpfTigMqPfYpsA
zE2D3r3cbjIkX1rNCbom634d1CN+1kfI6z3P8cVQSfxt+J8C63zWN+9p7GQv6wjJ
6gOQuQ2oYW38E0UK1p7ccM2I5+3KD5mysjjkw/YoQxYQFPB47krN00XmWiUvR/YJ
fT7R/DdD3dDr06YEr9/yD7iaGrPYXEQYjmCEMESf5zB04b7eyAtf5mVwpiRjaBdN
BkbQrEifNIxsQdN5OcX26UGe4BuzhiqRUfXI9fhFaGurWy9geaSY7uVHqbhwLUu9
QJaZsox855lCXZ2FlxwrlSrHskTj5IA=
=Hlpi
-----END PGP SIGNATURE-----