[Zope-dev] 2.2.0a1 won't work with query objects

T.J. Mannos MannosTJ@slcc.edu
Wed, 31 May 2000 07:39:09 -0600


> I think this is actually Zope's bug - if I'm not mistaken, the
> TinyTables product uses the Results class provided in
> lib/python/Shared/DC/ZRDB/Results.py, which would make it
> subject to breaking in the same way that SQLMethod results
> broke in the 2.2 alpha. I've included a copy of the note I
> sent to the folks reporting problems with SQLMethods that
> includes the patch you can use to verify that it fixes
> the problem for TinyTables as well:

That got me further, but it's still not all the way there:

Traceback (innermost last):
  File /usr/Zope-2.2.0a1-src/lib/python/ZPublisher/Publish.py, line 224, in
publish_module
  File /usr/Zope-2.2.0a1-src/lib/python/ZPublisher/Publish.py, line 189, in
publish
  File /usr/Zope-2.2.0a1-src/lib/python/ZPublisher/Publish.py, line 175, in
publish
  File /usr/Zope-2.2.0a1-src/lib/python/ZPublisher/mapply.py, line 160, in
mapply
    (Object: index.html)
  File /usr/Zope-2.2.0a1-src/lib/python/ZPublisher/Publish.py, line 112, in
call_object
    (Object: index.html)
  File /usr/Zope-2.2.0a1-src/lib/python/OFS/DTMLDocument.py, line 168, in
__call__
    (Object: index.html)
  File /usr/Zope-2.2.0a1-src/lib/python/DocumentTemplate/DT_String.py, line
500, in __call__
    (Object: index.html)
  File /usr/Zope-2.2.0a1-src/lib/python/OFS/DTMLMethod.py, line 156, in
__call__
    (Object: standard_html_header)
  File /usr/Zope-2.2.0a1-src/lib/python/DocumentTemplate/DT_String.py, line
500, in __call__
    (Object: standard_html_header)
  File /usr/Zope-2.2.0a1-src/lib/python/DocumentTemplate/DT_Util.py, line
333, in eval
    (Object: REQUEST.set('login',validateUser(_.None, _)))
    (Info: REQUEST)
  File <string>, line 0, in ?
  File /usr/Zope-2.2.0a1-src/lib/python/OFS/DTMLMethod.py, line 156, in
__call__
    (Object: validateUser)
  File /usr/Zope-2.2.0a1-src/lib/python/DocumentTemplate/DT_String.py, line
500, in __call__
    (Object: validateUser)
  File /usr/Zope-2.2.0a1-src/lib/python/DocumentTemplate/DT_With.py, line
146, in render
    (Object: PARENTS[0].sessions)
  File /usr/Zope-2.2.0a1-src/lib/python/OFS/DTMLMethod.py, line 156, in
__call__
    (Object: getLogin)
  File /usr/Zope-2.2.0a1-src/lib/python/DocumentTemplate/DT_String.py, line
500, in __call__
    (Object: getLogin)
  File /usr/Zope-2.2.0a1-src/lib/python/DocumentTemplate/DT_Util.py, line
333, in eval
    (Object: SESSION.has_key('login'))
    (Info: SESSION)
  File <string>, line 0, in ?
  File /usr/Zope-2.2.0a1-src/lib/python/DocumentTemplate/DT_Util.py, line
140, in careful_getattr
  File /usr/Zope-2.2.0a1-src/lib/python/OFS/DTMLMethod.py, line 180, in
validate
    (Object: index.html)
  File /usr/Zope-2.2.0a1-src/lib/python/AccessControl/SecurityManager.py,
line 139, in validate
  File /usr/Zope-2.2.0a1-src/lib/python/AccessControl/ZopeSecurityPolicy.py,
line 160, in validate
Unauthorized: has_key


So close!  Many of my queries work, but a few break when trying to access a
simple property or value (such as has_key).  Some even break inconsistently,
such as my getInstructorInfo query, which works fine inside a DTML document
but doesn't work at all inside a Z SQL method.  Here's its traceback:


You are not authorized to access getInstructorInfo.
Traceback (innermost last):
  File /usr/Zope-2.2.0a1-src/lib/python/ZPublisher/Publish.py, line 224, in
publish_module
  File /usr/Zope-2.2.0a1-src/lib/python/ZPublisher/Publish.py, line 189, in
publish
  File /usr/Zope-2.2.0a1-src/lib/python/ZPublisher/Publish.py, line 175, in
publish
  File /usr/Zope-2.2.0a1-src/lib/python/ZPublisher/mapply.py, line 160, in
mapply
    (Object: edit_instructors)
  File /usr/Zope-2.2.0a1-src/lib/python/ZPublisher/Publish.py, line 112, in
call_object
    (Object: edit_instructors)
  File /usr/Zope-2.2.0a1-src/lib/python/OFS/DTMLDocument.py, line 168, in
__call__
    (Object: edit_instructors)
  File /usr/Zope-2.2.0a1-src/lib/python/DocumentTemplate/DT_String.py, line
500, in __call__
    (Object: edit_instructors)
  File /usr/Zope-2.2.0a1-src/lib/python/DocumentTemplate/DT_With.py, line
146, in render
    (Object: REQUEST)
  File /usr/Zope-2.2.0a1-src/lib/python/DocumentTemplate/DT_Util.py, line
333, in eval
    (Object: db.updateInstructorInfo(login=login, name=name, email=email,
phone=phone, office=office, homepage=homepage, password=password))
    (Info: phone)
  File <string>, line 0, in ?
  File /usr/Zope-2.2.0a1-src/lib/python/Shared/DC/ZRDB/DA.py, line 432, in
__call__
    (Object: updateInstructorInfo)
  File /usr/Zope-2.2.0a1-src/lib/python/DocumentTemplate/DT_String.py, line
500, in __call__
    (Object: <string>)
  File /usr/Zope-2.2.0a1-src/lib/python/DocumentTemplate/DT_Util.py, line
327, in eval
    (Object: getInstructorInfo(login=login))
    (Info: getInstructorInfo)
Unauthorized: (see above)