Creators field always appends current user

I am working on a custom content type which should have a creators field like the Dublin Core one. When testing the new content type, I noticed that Plone always appends the current username to the creators field whenever I edit the item.

I am not sure if this is expected or not. The point is, in the final application I am working with, the idea is that the user is an intern or secretary that edits the content item, on behalf of the "true author". So, the intern would edit the creators field to fill in the authors name (the author might not even be a Plone user). So, it would not be desirable (as far as the application requirements go) to have the intern username appended to the creators field.

Using another (new) field would be not preferred, because the default byline for content types show up the first creator already.

Is it possible to do that in Plone? Any other suggestions?

Thank you all.

using a new field for this is, IMO, the preferred solution; you are working on a custom content type and you can modify the view template the way you want.

take a look at the byline field in collective.nitf.

there's even an index and metadata in the catalog for this field.

This is a known issue that was recently fixed, in plone.dexterity 2.4.1: https://pypi.python.org/pypi/plone.dexterity#changelog

1 Like

may I ask why a new bug fix release has been created for a change with incompatible behaviour?

Because the old behavior was accidental and broken. It was never intended to add the current user when the field already had a value; only to fill one in if it was blank.

are you sure that was not the "standard" behaviour also on Archetypes?

Pretty sure...CMFDefault's Dublin Core implementation does this (it calls addCreator from notifyModified even if there is already a creator), but Archetypes overrides notifyModified and does not call addCreator.

1 Like