[Zope-CMF] why portal_catalog collect "None" object ?
Dieter Maurer
dieter@handshake.de
Tue, 18 Mar 2003 22:38:16 +0100
GC wrote at 2003-3-18 18:17 +0800:
> I use this code within a python script of my CMF site
>
> entries = context.portal_catalog(portal_type =
> CPS_meta_type,
> review_state = public_state,
> sort_on = 'Counter',
> sort_order = "reverse")
>
> Amazingly, it collect also the "deleted" object, such that my page
> template form got an error
> caused from
> "None" object can not apply getObject() method !!
>
> Why these ghost objects still be collected by portal_catalog ?
> How can I avoid this ?
The code you show us does not contain "getObject"...
Obviously, the cited error message does not relate to the above
code snippet.
Come back again with the correct one.
> Another weird problem about my portal_catalog is that
>
> it collect redundant object objects with recursive path that are
> identical to the same object !
> For example :
>
> I got a list of objects with the following url
>
> http://gc:88/
>
>
> http://gc:88/Members/john/Dumbell_Covering_Problem/Plone/Members/john/Du
> mbell_Covering_Problem
>
>
> http://gc:88/Members/john/Dumbell_Covering_Problem/Plone/Members/john/Du
> mbell_Covering_Problem/Plone/Members/john/Dumbell_Covering_Problem
>
> ...
>
> My Goodness !
Indeed!
Usually, the catalog uses "getPhysicalPath" to derive an uid
for an object. The application can pass in a different uid.
As you see, your application did....
Dieter