RE: [Zope-dev] 2.2.0a1 won't work with query objects
> 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 , 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 , 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 , 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: ) 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) ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-anno
RE: [Zope-dev] 2.2.0a1 won't work with query objects
> Even when I have logged in as the admin user I get an error > message I suppose from the dtml fragment > > > > > > > > > > If I force validate to be None inside DT_In.py (renderwob) > then I can at > least get a dtml-in TinyTable to work. It seems as though the > tinytable > product is broken in some way. Anybody know what how etc? > -- > Robin Becker 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: > Those of you who have had problems with SQL Method results in > the 2.2 alpha (that's probably everyone!) may want to apply > the following patch to lib/python/Shared/DC/ZRDB/Results.py. > If you are tracking CVS, you can just update the file. This > is the fix for the authentication problem - it will be in > forthcoming 2.2 beta. *** Results.py 2000/03/10 22:32:08 1.10 --- Results.py 2000/05/23 18:57:12 1.11 *** *** 99,104 --- 99,108 """ _index=None + # We need to allow access to not-explicitly-protected + # individual record objects contained in the result. + __allow_access_to_unprotected_subobjects__=1 + def __init__(self,(items,data),brains=NoBrains, parent=None, zbrains=None): Brian Lloyd[EMAIL PROTECTED] Software Engineer 540.371.6909 Digital Creations http://www.digicool.com ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] 2.2.0a1 won't work with query objects
In article, Robin Becker <[EMAIL PROTECTED]> writes >I have started with clean 2.2.0a1 and have then created an admin user. As this >user I have >imported my old 2.0 exported database. > >I have given anonymous rights to query Tinytables, but am still forced to >attempt to login. Even >when I have logged in as the admin user I get an error message I suppose from >the dtml fragment > > > > If I force validate to be None inside DT_In.py (renderwob) then I can at least get a dtml-in TinyTable to work. It seems as though the tinytable product is broken in some way. Anybody know what how etc? -- Robin Becker ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] 2.2.0a1 won't work with query objects
I have started with clean 2.2.0a1 and have then created an admin user. As this user I have imported my old 2.0 exported database. I have given anonymous rights to query Tinytables, but am still forced to attempt to login. Even when I have logged in as the admin user I get an error message I suppose from the dtml fragment Zope Error Zope has encountered an error while publishing this resource. Unauthorized Sorry, a Zope error occurred. Traceback (innermost last): File C:\Python\Zope\lib\python\ZPublisher\Publish.py, line 224, in publish_module File C:\Python\Zope\lib\python\ZPublisher\Publish.py, line 189, in publish File C:\Python\Zope\lib\python\ZPublisher\Publish.py, line 175, in publish File C:\Python\Zope\lib\python\ZPublisher\mapply.py, line 160, in mapply (Object: index_html) File C:\Python\Zope\lib\python\ZPublisher\Publish.py, line 112, in call_object (Object: index_html) File C:\Python\Zope\lib\python\OFS\DTMLMethod.py, line 160, in __call__ (Object: index_html) File C:\Python\Zope\lib\python\DocumentTemplate\DT_String.py, line 500, in __call__ (Object: index_html) File C:\Python\Zope\lib\python\DocumentTemplate\DT_In.py, line 682, in renderwob (Object: NavData) Unauthorized: 0 -- Robin Becker ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] 2.2.0a1 won't work with query objects
Kyler B. Laird ([EMAIL PROTECTED]) posted a quick n' dirty fix on the Zope mailing list. I'll include it here for convenience: -- snip -- After beating on this over the last day or so trying to understand what was happening at the Web interface level (thinking that I must have just screwed up a permissions setting somewhere), I finally looked at the code and simply commented out line 602 in /data/www/Zope/Zope-2.2.0a1-src/lib/python/DocumentTemplate/DT_In.py # raise ValidationError, index -- snip -- Hope this helps, T.J. ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] 2.2.0a1 won't work with query objects
In article <000401bfc224$475de410$8119adcf@Pooky>, T.J. Mannos <[EMAIL PROTECTED]> writes >Hi, all, > >I tried compiling 2.2.0a1 straight out of the box on Solaris 7. Everything >worked great until I tried querying a tiny table or MySQL database. The >following code causes Zope to prompt me for a login, and no matter what user >name I use (even the superuser), it comes back "unauthorized." > > > > > >If I take out the section, my pages pops right up. Any ideas? > >Sincerely, >T.J. Mannos >Salt Lake Community College > > ... I have the same problem. I find it impossible to even add tinytables. -- Robin Becker ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )