cancel
Showing results for 
Search instead for 
Did you mean: 

Setting the title with metadata extraction

samuel_penn
Champ in-the-making
Champ in-the-making
Hi all,

I have metadata extraction setup in a WCM project, which amongst other things is taking a title out of the XML on a document and placing it into the cm:title property of the node. However, this doesn't work when content is initially created, and cm:title gets overwritten with the name of the content. If the content is subsequently edited, the cm:title property is correctly set.

I'm assuming that what is happening is that the meta data extraction is run (filling in cm:title, cm:description and other custom properties), then cm:title is overwritten by the content name. All the other properties are populated correctly on content creation - it is only the cm:title that has problems.

Is there a way to disable this automatic setting of the cm:title property?

Thanks,

Sam.
2 REPLIES 2

buddycasino
Champ in-the-making
Champ in-the-making
I have a similar problem.

As for the content extraction, you may want to look into "Overwrite Policies". These allow you define their behaviour when a property has already been set:
http://wiki.alfresco.com/wiki/Metadata_Extraction#Overwrite_Policies

There might also be another reason, at least for WebDAV. In
org.alfresco.repo.webdav.PutMethod#executeImpl()
, the properties ContentModel.PROP_TITLE and ContentModel.PROP_DESCRIPTION are set, regardless of any previous values that might have been assigned.

The only solution I can think of is to patch that that class in order to prevent the behaviour outlined above. Alfresco should definitely fix this.

Btw., I'm on version 2.1.1.

samuel_penn
Champ in-the-making
Champ in-the-making
We're using the EAGER policy, since we need to overwrite the object values if the user changes the form data. On subsequent saves, the cm:title is overwritten correctly - it's just the first time the content is created that causes a problem.

This is on Alfresco 2.2.0.

Sam.