Hash: SHA1

Philipp von Weitershausen wrote:

> Tres, if you're experiencing the test failures with the Zope 2 trunk but
> not with Zope 2.8 branch, it might be because your stub request is
> lacking the 'default' layer. In Zope 3.1+, layers and skins are
> interfaces extending IBrowserRequest and they are directly provided on
> the request object by the skin machinery. Five tricks the Zope 2 request
> into providing the correct default skin interfaces with the following
> code in Traversable.__bobo_traverse__():
>         from zope.app.publication.browser import setDefaultSkin
>         from zope.app.interface import queryType
>         [snip]
>         # set the default skin on the request if it doesn't have any
>         # layers set on it yet
>         if queryType(REQUEST, ILayer) is None:
>             setDefaultSkin(REQUEST)
> In order to do deal with this (e.g. in tests) in both Zope 2.8 and 2.9
> without resorting to ugly try/except clauses, Five could maybe grow a
> convenience function to do the above. It would do nothing in Five 1.2
> and the above in 1.3. It would go away for Five 1.5.
> Let me know if this is the case, I'll be happy to put the function into
> Five and release new betas of 1.2 and 1.3.

The error I am seeing is early, during product initialization, before
any tests are actually running:

line 1390, in toargs
    args[str(name)] = field.fromUnicode(s)
line 231, in fromUnicode
    raise InvalidToken("%s in %s" % (v, u))
ZopeXMLConfigurationError: File
line 5.2-7.6
    ZopeXMLConfigurationError: File
line 11.2-14.8
    ConfigurationError: ('Invalid value for', 'layers', "Couldn't import
default, No module named default in cmf default")
2005-11-15 14:05:11 ERROR Zope Couldn't install Five

That line in CMFDefault/skin/configure.zcml does:

  <!-- 'default' layer breaks when run under 2.9! -->
      layers="cmf default"

- --
Tres Seaver          +1 202-558-7113          [EMAIL PROTECTED]
Palladion Software   "Excellence by Design"    http://palladion.com
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org


Tres Seaver          +1 202-558-7113          [EMAIL PROTECTED]
Palladion Software   "Excellence by Design"    http://palladion.com

Zope-CMF maillist  -  Zope-CMF@lists.zope.org

See http://collector.zope.org/CMF for bug reports and feature requests

Reply via email to