cancel
Showing results for 
Search instead for 
Did you mean: 

share-config-custom file keeps getting automatically overwritten!

sepgs2004
Star Contributor
Star Contributor
I'm using the tutorial:
<url>http://ecmarchitect.com/alfresco-developer-series-tutorials/content/tutorial/tutorial.html</url>

I am using version Alfresco 5.0.c community.

This tutorial works off of the embedded tomcat server. Using this tutorial, I created a custom type yyy:cdocument (that extends cm:content), and an aspect yyy:caspect with a set of custom properties; this aspect is associated with this yyy:cdocument.

Using the share UI, when I manually change the type of an (uploaded) document to yyy:cdocument, I see all the custom properties.

I did follow the tutorial exactly as is, except for the following situation. Using the share UI, I created a site, say YYYSite, and added a folder called Person. I added a rule saying, when a document is created in this folder, change the type to the custom yyy:cdocument.

So now, whenever I upload a document into this folder, and when I edit the properties of the added document, I can see that the document is of the custom type and it allows me to edit all the custom (aspect) properties.

Well and good.

Now, in the tutorial, I am on section "Configuring Forms for Custom Properties".
In this section, author says, the form that is shown when editing the properties of the document is not nice, and so recommends to enforce a form for the purposes of editing.

So, it is recommended to copy the config element
 
<config evaluator="node-type" condition="cm-content">

</config>

from
target/yyy-share-war\WEB-INF\classes\alfresco\share-form-config.xml
(where yyy is the custom project name)
to
yyy-share\target\classes\META-INF\share-config-custom.xml
(this file was created by me following the early sections of the tutorial)

Anyways, I copied this section and renamed the condition="cm-content" to condition="yyy:cdocument" (as recommended)

For some reason, this file (yyy-share\target\classes\META-INF\share-config-custom.xml) gets overwritten to what it was when I restart the share server. I tried changing this file by having the share server stopped and once not stopped. It keeps overwriting my changes.

I could not reason this out.

I wonder if what I did contributed to the forms or if it is due to the fact that the tutorial following 5.0.d when I am working with 5.0.c, or what!

I am concerned because I am working on developing steps/guidelines for installing (incorporating) our custom model in a Alfresco install. With this behavior, I do not know if I need to consider having a custom form definition.

Can someone help me please?
Gnanasekaran Sakthivel
1 REPLY 1

sepgs2004
Star Contributor
Star Contributor
I was editing the share-config-custom.xml at location yyy-share\target\classes\META-INF\
instead of the one at location: yyy-share\src\main\resources\META-INF

I think the tutorial, on the first place, mentioned this folder. In the later section, the tutorial directs one to edit the file as it was done before. For being lazy to go through the previous pages of the tutorial, I searched for the file (share-config-custom.xml) under the (root) yyy-share directory and somehow got hold of the file in this target folder location, instead of the src folder.

Tomcat, as any other j2ee/web-app servers, builds from src to target every time it is started. That is the reason, it overwrote the file in target folder from the src folder.

Thanks for your time.
Gnanasekaran Sakthivel
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.