zopefoundation / Products.CMFCore

Key framework services for the Zope Content Management Framework (CMF)
Other
6 stars 20 forks source link

CMFCatalogAware reindexObject API has a problem with uid #87

Open ewohnlich opened 4 years ago

ewohnlich commented 4 years ago

This change https://github.com/zopefoundation/Products.CMFCore/commit/d76903bb96416974c3b55c8f85c169d11e3dbd35 added two new parameters including one for "uid". This is eventually passed on to Product.ZCatalog's "catalog_object" which will assign a uid of the object's path if it is not otherwise defined. The problem is that it is literally checking "is None" for uid, and the default value of False does not satisfy that condition. ZCatalog will then raise a CatalogError "The object unique id must be a string."

I believe the default value for uid in CMFCatalogAware.CatalogAware.reindexObject should simply be changed from False to None.

dataflake commented 4 years ago

Assigning to Gil who authored those changes

gforcada commented 4 years ago

Yes, sounds sane, I can't remember where I copied those arguments from, and why the default was False, but I'm :+1: on changing the default, @ewohnlich would you mind creating the pull request yourself? I'm quite short on time lately :confused:

ewohnlich commented 4 years ago

Sure I can do that. I have not contributed to this project before though - do I need to sign the Plone contributor agreement for this? And is this documentation on what else to update e.g. a changelog?

dataflake commented 4 years ago

Code contributions require a signed contributor agreement, a change log entry and if at all possible unit tests for the change.

ewohnlich commented 4 years ago

No problem, I will make a fork and submit a PR for it. Question about the contributor agreement: can I just put "Plone" for the program name, or do I need to submit an agreement for each package modified?

d-maurer commented 4 years ago

Eric Wohnlich wrote at 2020-3-20 21:50 -0700:

No problem, I will make a fork and submit a PR for it. Question about the contributor agreement: can I just put "Plone" for the program name, or do I need to submit an agreement for each package modified?

Currently, there are two relevant "program"s: "Plone" for contribution to "plone" and "Zope" for contribution to "zopefoundation" packages.