Re: [Zope] Automatic Cataloging
Andreas Jung wrote at 2007-6-10 08:49 +0200: > ... >newob = container.manage_clone(...) >newob.manage_changeProperties(REQUEST=context.REQUEST) >catalog.catalog_object(...) Minor remark: Usually, it is a bad idea to call "manage_changeProperties" (or other "mange*" methods) with a REQUEST argument. The "manage*" methods interpret the passing of "REQUEST" as "I am used from the ZMI" and often perform a redirect in this case -- with is usually not wanted. An alternative (but not sure) to the code above might be "...manage_changeProperties(**REQUEST.form)" -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Automatic Cataloging
Tom Von Lahndorff wrote at 2007-6-9 14:09 -0400: > ... > You try to catalog "business_name" which is likely a string. You should not expect that cataloging a string affects many indexes ;-) You what to catalog the cloned object. I think (but I am not sure) that "this" may refer to this object. If not, be explicit an use "dtml-let" to assign the result of "manage_clone" to an itermediate variable. -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Automatic Cataloging
On Jun 10, 2007, at 2:49 AM, Andreas Jung wrote: --On 9. Juni 2007 14:09:15 -0400 Tom Von Lahndorff <[EMAIL PROTECTED]> wrote: Hi, I have a zCatalog installed and I'm trying to automatically catalog an object and it's properties using: What a dirty code :-) Such code should be written using a PythonScript: newob = container.manage_clone(...) newob.manage_changeProperties(REQUEST=context.REQUEST) catalog.catalog_object(...) im aware. humor me. :) The zCatalog has indexes and metadata: business_name business_company business_street business_town business_county business_state business_zipcode business_phone business_website business_email The object does get cataloged with the "newid" but none of the indexes or metadata get updated. Hard to believe...do you have properties defined for the particular object? Yes. same names as whats listed above. -aj ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Automatic Cataloging
--On 9. Juni 2007 14:09:15 -0400 Tom Von Lahndorff <[EMAIL PROTECTED]> wrote: Hi, I have a zCatalog installed and I'm trying to automatically catalog an object and it's properties using: What a dirty code :-) Such code should be written using a PythonScript: newob = container.manage_clone(...) newob.manage_changeProperties(REQUEST=context.REQUEST) catalog.catalog_object(...) The zCatalog has indexes and metadata: business_name business_company business_street business_town business_county business_state business_zipcode business_phone business_website business_email The object does get cataloged with the "newid" but none of the indexes or metadata get updated. Hard to believe...do you have properties defined for the particular object? -aj pgpyE4kw9Z8Ws.pgp Description: PGP signature ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Automatic Cataloging
Hi, I have a zCatalog installed and I'm trying to automatically catalog an object and it's properties using: The zCatalog has indexes and metadata: business_name business_company business_street business_town business_county business_state business_zipcode business_phone business_website business_email The object does get cataloged with the "newid" but none of the indexes or metadata get updated. Thanks in advance. Tom ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )