Hi,

I didn't find a bug on launchpad (didn't search _very_ hard), but I also
don't have a recent zope at hand to verify this problem is still there.
That's also the reason I didn't consider filing a bug.

Zope Version (Zope 2.10.3-final, python 2.4.4, openbsd4)
Python Version 2.4.4 (#1, Aug 15 2007, 13:27:05) [GCC 3.3.5 (propolice)

When instantiating a BrowserView (perhaps also elsewhere) if I refer to
an inexistant key on request, creation of the view fails silently; the
user gets a NotFound, which is ignored by default.

sample code (test.py):

from zope.app.publisher.browser import BrowserView
#from Products.Five.browser import BrowserView # no difference

class A(BrowserView):
    def __init__(self, context, request):
        self.request = request
        self.context = context
        dummy = self.request.garbage

    def __call__(self):
        return 'Foo'

configure.zcml:

    <browser:page
        for="*"
        class=".test.A"
        permission="zope2.View"
        name="a"
        />

error:
Traceback (innermost last):
  Module ZPublisher.Publish, line 110, in publish
  Module ZPublisher.BaseRequest, line 498, in traverse
  Module ZPublisher.HTTPResponse, line 671, in debugError
NotFound:   <h2>Site Error</h2>
  <p>An error was encountered while publishing this resource.
  </p>
  <p><strong>Debugging Notice</strong></p>

  Zope has encountered a problem publishing your object.<p>
Cannot locate object at: http://127.0.0.1:8087/a</p>

I searched almost a day for a silly typo :-)

regards,
knitti
_______________________________________________
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to