> I cannot even follow your strategy (similar to my previous AppInstall
> strategy), since the catalog.xml file is there in the default profile.
>
> What can I do? In order to follow your strategy (to do all in
> setuphandlers.py) I should:
> 1. not use AGX, or remove all index-related tags from the UML model of my
> products, or
> 2. patch AGX so that it doesn't generate the catalog.xml file, or remove the
> file in the script running AGX, or
> 3. patch the _importNode method of module exportimport.py in
> GenericSetup/ZCatalog to disable purging.
> If I choose option 3., I recover the past behaviour.
Since GenericSetup architecture does not seem to have separate
concepts for additional and replacement export/import XMLs some things
are broken (please correct me if I am wrong). This is not limited to
catalog.xml, but concerns at least Kupu styles also (can't add Kupu
styles without pruning existing ones).
I have dealt with catalog.xml problem by just reindexing the whole
site for these particular indexes in exportimport.by. This is by no
means a long term option, but if the quick installer is not run that
often it works.
Thus, I just reindex the indexes on each quick installer run:
<?xml version="1.0"?>
<object name="portal_catalog" meta_type="Plone Catalog Tool">
<index name="getVisitDate" meta_type="DateIndex">
<indexed_attr value="getVisitDate"/>
</index>
<index name="getOrdinationStartDate" meta_type="DateIndex">
<indexed_attr value="getOrdinationStartDate"/>
</index>
<!-- metadata fields -->
</object>
def importFinalSteps(context):
"""
The last bit of code that runs as part of this setup profile.
"""
site = context.getSite()
.....
site.portal_catalog.manage_reindexIndex(ids=['getVisitDate','getOrdinationStartDate'])
-Mikko
_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers