[Zope] Adding a Factory results in a new ZCatalog index type

Maik Jablonski maik.jablonski@uni-bielefeld.de
Sat, 26 Jan 2002 13:43:08 +0100


hello,

>  > in short-terms: when i add a simple new product with a "add list name"
>  > like TEST (as described in the Zope Book), then 'TEST' will be displayed
>  > in the list of INDEX-Types in a ZCatalog ('TextIndex',
>  > 'KeyWordIndex','PathIndex','FieldIndex' and 'TEST'!!!!!!!!!). that's
>  > what i don't want.

my "new" product is EXACTLY the simple "HELLO"-example out of the 
Zope-Book. No additional features or something like that.

http://www.zope.org/Members/michel/ZB/CustomZopeObjects.dtml

and the result is (go to an ZCatalog => click on the Indexes-TAB => open 
"Select type to add"-menu):

FieldIndex
Hello                   <= that should not be there i think!!!!
KeyWordIndex
PathIndex
TextIndex

as I've mentioned before: same results on fresh installations of 2.4.3 or 
2.5.b4!!!

that's why i am worried about and think it must be a bug or something with 
wrong permissions or so. maybe someone could test this on his own 
installation and report the results???

>I looked at the code in "Products.ZCatalog.ZCatalogIndexes.ZCatalogIndexes"
>and "OFS.ObjectManager.IFObjectManager" and 
>"OFS.ObjectManager.ObjectManager.all_meta_types":
>
>   The content of the (offending) add list is determined by
>   "meta_types" and the products implementing the "PluggableIndexInterface"
>   and the products from "_product_meta_types".
>
>   Apparently, your ZClass is in this list. I would expect, that
>   it implements the "PluggableIndexInterface", although I do
>   not understand why it should do that.

I've looked at "filtered_meta_types" in the ObjectManager-Code. The "Select 
type to add"-menu in the Index-Tab of the ZCatalog will be generated out of 
this list. My "Hello"-product is in this list if i look in the menu "Select 
type to add" at the INDEX-Tab of a ZCatalog. If i am guessing right, 
"filtered_meta_types" should only contain the "meta_types" which the user 
has permissions for. and that's why i am nerving. maybe there's a security 
problem in the "standard-creation" of a new product through the web...

thank you for your help so much. hope to have made things a little bit 
clearer...

maik jablonski.