cancel
Showing results for 
Search instead for 
Did you mean: 

Issue while saving the content in Alfresco Share

ganmaku
Champ on-the-rise
Champ on-the-rise
Hi Team,
I have created a custom type and added few metadata.

I have added neccessary fields to the share-form-config.xml file under the <config evaluator="model-type" condition="cm:content"> in order to show those metadata to the Create content page.

I have added the following piece of code to the webapps\share\WEB-INF\classes\alfresco\site-webscripts\org\alfresco\components\documentlibrary\include\toolbar.lib.ftl file in order to display the create content menu to the Document Library page.

        <div class="create-content">
            <a rel="" href="create-content?mimeType=text/xml&amp;destination={nodeRef}&amp;formId=kms-form2" class="yuimenuitemlabel">
            <span class="xml-file">Creer Document</span>
            </a>
       </div>
I am getting the following error while saving the content:
Failed to create content: org.alfresco.repo.forms.FormException: 10170103 Failed to persist form for 'cm:content' as 'alf_destination' data was not provided.
Any help would be highly beneficial for me!!!
3 REPLIES 3

ganmaku
Champ on-the-rise
Champ on-the-rise
Hi team,

Could anyone please help on this issue?

gavinc
Champ in-the-making
Champ in-the-making
I can't see an obvious reason why this is not working, I presume you are using the existing create content page, in other words you haven't created a custom page in your application?

A hidden "alf_destination" field is normally added to the generated form, the fact you get the error you mentioned means this has not been generated. The alf_destination value is retrieved from the "destination" URL parameter, I suspect that this argument in your URL is empty.

Can you post back the URL that gets generated for the create content URL? Also it would be useful to see the HTML source of the generated form.

ganmaku
Champ on-the-rise
Champ on-the-rise
Yes, the issue has been resolved after explicitly adding the "alf_destination" hidden property to the custom create content page.

Thanks a lot….