[Erp5-users] How to actually use ERP5 Catalog within CMF Portal

Alexey Morozov alex at idisys.iae.nsk.su
Thu Jun 30 15:21:38 CEST 2005


I started from a freshly created CMF Portal named test. After creation
it breaks to show because of ERP5Type/ZopePatch (known error, it's Ok,
will fix it later).

Then I deleted the standard portal_catalog tool as
http://www.erp5.org/workspaces/project/zsqlcatalog/INSTALL.txt suggests,
added Z MySQL DA named catalog_database_connection, and set it up to the
previously created databased 'testcatalog'. Then I added ERP5 Catalog
tool (it automatically got name 'portal_catalog') and inside it,
created three ZSQL methods: z_create_catalog, z_create_roles_and_users
and z_create_subject (w/ contents described in the mentioned INSTALL.txt)

So far so good.

But what next?

Trying to press 'Find and catalog' for DTML Documents in 'Find objects'
leads to
----------------
    * Module ZPublisher.Publish, line 101, in publish
    * Module ZPublisher.mapply, line 88, in mapply
    * Module ZPublisher.Publish, line 39, in call_object
    * Module Products.ZSQLCatalog.ZSQLCatalog, line 551, in
manage_catalogFoundItems

NameError: global name 'time' is not defined (Also, an error occurred
while attempting to render the standard error message.)
-----------------

Even trying to view the created portal still doesn't works because, as I
see, the line 389 of ERP5Type/ZopePatch.py

    searchres_len = int(apply(catalog.countResults, (), dict)[0][0])

silently assumes that catalog.countResults will return at least one
record... (Also it seems that python < 2.3 is a [dark] history nowadays,
so the line above could be safely rewritten as

    searchres_len = int(catalog.countResults(**dict)[0][0])

assuming we catch list index errors somewhere.

So what should I do next to actually start using ERP5Catalog/ZSQLCatalog?

BTW, is there an IRC channel to ask stupid questions about ERP5 in
real-time? :-)

Alexey Morozov



More information about the Erp5-users mailing list