Hi, I have a problem with 'getObject' method of CatalogBrains class on Zope271b1 : it's return None. But with a Zope2.7.0 my object is correctly find and returned. The permissions are right. is there any bug here ? Thanks Eric Brun Ingénieur de développement eric.brun@pentila.com Pentila Bâtiment Euclide 73370 Le Bourget du Lac Savoie Technolac http://www.pentila.com
--On Mittwoch, 16. Juni 2004 11:16 Uhr +0200 Eric Brun <eric.brun@pentila.com> wrote:
Hi,
I have a problem with 'getObject' method of CatalogBrains class on Zope271b= 1 : it's return None. But with a Zope2.7.0 my object is correctly find and returned. The permissions are right.
is there any bug here ?
Please file a detailed collector issue if you think that there is a problem including a reasonable description and a reproducable testcase. Thanks, -aj
Eric Brun wrote:
Hi,
I have a problem with 'getObject' method of CatalogBrains class on Zope271b1 : it's return None. But with a Zope2.7.0 my object is correctly find and returned. The permissions are right.
Probably an object has been deleted without being uncatalogued. This happens often. Either reindex the catalog, or take the None's into account in your code. The latter is the safest approach. -- hilsen/regards Max M, Denmark http://www.mxm.dk/ IT's Mad Science
getObject was refactored recently and its security was increased. It uses restrictedTraverse() now, which means that you need access to all of the enclosing folders as well as the object. Before, no security checking was performed by getObject. I suspect you do not have access to one of the containing folders. -Casey On Wed, 16 Jun 2004 11:16:55 +0200 Eric Brun <eric.brun@pentila.com> wrote:
Hi,
I have a problem with 'getObject' method of CatalogBrains class on Zope271b1 : it's return None. But with a Zope2.7.0 my object is correctly find and returned. The permissions are right.
is there any bug here ?
Thanks
Eric Brun Ingénieur de développement eric.brun@pentila.com
Pentila Bâtiment Euclide 73370 Le Bourget du Lac Savoie Technolac http://www.pentila.com
_______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
On Wed, 16 Jun 2004 11:16:55 +0200
Eric Brun <eric.brun@pentila.com> wrote:
Hi,
I have a problem with 'getObject' method of CatalogBrains class on Zope271b1 : it's return None. But with a Zope2.7.0 my object is correctly find and returned. The permissions are right.
Em Qua, 2004-06-16 às 11:28, Casey Duncan escreveu:
getObject was refactored recently and its security was increased. It uses restrictedTraverse() now, which means that you need access to all of the enclosing folders as well as the object. Before, no security checking was performed by getObject.
I suspect you do not have access to one of the containing folders.
I certainly hope he'd get a permission error instead of silent 'None' for '.getObject()' in this case or I'd consider it a bug :-) Cheers, Leo -- Leonardo Rochael Almeida <leo@hiper.com.br>
On Sat, 19 Jun 2004 20:14:47 -0300 Leonardo Rochael Almeida <leo@hiper.com.br> wrote:
On Wed, 16 Jun 2004 11:16:55 +0200
Eric Brun <eric.brun@pentila.com> wrote:
Hi,
I have a problem with 'getObject' method of CatalogBrains class on Zope271b1 : it's return None. But with a Zope2.7.0 my object is correctly find and returned. The permissions are right.
Em Qua, 2004-06-16 às 11:28, Casey Duncan escreveu:
getObject was refactored recently and its security was increased. It uses restrictedTraverse() now, which means that you need access to all of the enclosing folders as well as the object. Before, no security checking was performed by getObject.
I suspect you do not have access to one of the containing folders.
I certainly hope he'd get a permission error instead of silent 'None' for '.getObject()' in this case or I'd consider it a bug :-)
Me to, except that changing this behavior will break existing apps. There is an implicit contract the getObject should not raise errors. Perhaps this means we need a different method with better behavior. Somehow that doesn't seem all that appealing, however. -Casey
Eric Brun wrote at 2004-6-16 11:16 +0200:
I have a problem with 'getObject' method of CatalogBrains class on Zope271b= 1 : it's return None. But with a Zope2.7.0 my object is correctly find and returned. The permissions are right.
is there any bug here ?
They return "None" when the object no longer exists. Check the path ("getPath" method) and verify whether the object exists. -- Dieter
participants (6)
-
Andreas Jung -
Casey Duncan -
Dieter Maurer -
Eric Brun -
Leonardo Rochael Almeida -
Max M