[ZCM] [ZC] 166/ 5 Resolve "Adding a Factory results in a new ZCatalog index type"

Collector: Zope Bugs and Patches ... zope-coders@zope.org
Wed, 13 Feb 2002 10:31:17 -0500


Issue #166 Update (Resolve) "Adding a Factory results in a new ZCatalog index type"
 Status Resolved, Zope/bug medium
To followup, visit:
  http://collector.zope.org/Zope/166

==============================================================
= Resolve - Entry #5 by ajung on Feb 13, 2002 10:31 am

 Status: Pending => Resolved

A fix for ObjectManager.all_meta_types() is in the 2.5 branch and
branch. 

- aj 
________________________________________
= Comment - Entry #4 by mjablonski on Jan 28, 2002 1:52 am

Dieter Maurer posted to me:
---------------------------

With your concise error description, I have been able to reproduce the problem and analyse it:

"ObjectManager.all_meta_types" looks at three places to
find the applicable meta types:

"_product_meta_types"  acquired, if necessary
"Products.meta_types"
"self.meta_types"

Filtering based on interfaces only takes the "Products.meta_types" into account. It does not filter meta types found in either "_products_meta_types" and "self.meta_types".

This is almost surely a bug. The bug will manifest itself wherever interface based filtering is necessary. Currently, there are only few places in Zope. You found one.

________________________________________
= Comment - Entry #3 by mjablonski on Jan 26, 2002 7:56 am

The problem is the same with the simple "Hello"-Product out of th e Zope_Book.
________________________________________
= Comment - Entry #2 by mjablonski on Jan 24, 2002 5:45 am

what to do to reprdoce the effect:

1. Take a fresh install of Zope 2.4.3 or 2.5.0b4 (you can surely use your configured install, this is only to avoid mistakes caused by other products or so.)
2. Go to the Product-Management and add a new Product (call it TheTest or something)
3. Enter the new product 'TheTest'
4. Add a DTML-Method with id = hello (don't change the source) in the product 'TheTest'
5. Add a Zope Factory with id = TheFactory, Add list name = TEST, Initial method = hello
6. Now create a ZCatalog somewhere in your Root-Folder or elsewhere or enter an existing ZCatalog
7. Enter the ZCatalog and CLICK ON THE INDEXES-Tab (!!!!!!!!!!!!)
8. Now pull down the "Select type to add..."-Menu.

In my Menu are now:

FieldIndex
KeywordIndex
PathIndex
TEST        <-- That's what i don't want here
TextIndex

i think it's a problem with "filtered_meta_types". this list should only contain meta_types for which the user has permissions.
________________________________________
= Request - Entry #1 by mjablonski on Jan 22, 2002 11:27 am

when i add a new product through the zope management interface and then add a new Zope Factory in this Product (with the "Add list name" something like TEST), "TEST" will be listed both in the general management interface selection-box and in the "Select type to add"-list of the INDEX-TAB in a ZCATALOG!!!! the first is what i wanted, the second is not right i guess...

I've tested this on fresh installations of 2.4.3 and 2.5.0b4. same results.
==============================================================