[Zope-dev] CatalogPathAwareness, CatalogAwareness and ZClass CatalogAware (2.3.3)

Didier Georgieff Didier.GEORGIEFF@agriculture.gouv.fr
14 Nov 2001 17:58:24 +0100


Hello,

On 2.3.3 i just discovered a problem with CatalogAware ZClass and 
VHM.

All CatalogAware auto-indexing is fine when i dont use VHM, and 
when i have (thru Apache and VHM) my root as a folder the 
autocataloging get the wrong physical path :


Example for the same object :

www.mysite.com/folder1/item1 is well autoZCataloged as 
/folder1/item1 (no VHM)

but myvirtualsite.com/item1 is missAutoZcataloged as /item1 (with 
VHM)

If i try to "find"/Catalog the objects they are **well** cataloged (with 
WHM and without VHM).

After looking at the list, i found few informations about 
VirtualHostFix but normally it's fixed and i do think the problem is 
elsewhere.

So :

in ZCatalog/__init__.py 

there is registring for the old CatalogAwareness instead of the new  
CatalogPathAwareness (with the getURL, getPath wich i use 
without anu problem in my application)

import ZCatalog, Catalog, CatalogAwareness, Vocabulary, 
ZClasses
createZClassForBase( CatalogAwareness.CatalogAware, globals()
                   , 'CatalogAwareBase', 'CatalogAware' )


My questions are :

? Why is there no reference to the new CatalogPathAwareness for 
CatalogAware ZClass ?
I suspect this is the reason why CatalogAware fails and "find" 
works fine on CatalogAware instance.

? Is this a bug or done by purpose ?

? What happens if i just change the ZCatalog/__init__

with 

import ZCatalog, Catalog, CatalogPathAwareness, Vocabulary, 
ZClasses
createZClassForBase( CatalogPathAwareness.CatalogAware, 
globals()
                   , 'CatalogAwareBase', 'CatalogAware' )

Will the thunder will strike me ??

Any help or tip would be more than welcome.
Thanks in advance.

--
Didier Georgieff
Chef de projet technique SIT du Bas-Rhin
t=E9l : 03.88.76.78.35 - fax : 03.88.76.78.34
email : didier.georgieff@agriculture.gouv.fr