AnsweredAssumed Answered

Namespace prefix <namespace> is not mapped to a namespace URI

Question asked by charlie.k on Jun 19, 2013
Latest reply on Apr 28, 2015 by darkredd
Hello everyone,
I just want to point out that I am new to Alfresco development and it is not going as well as I expected compared to other platforms (maybe this is due to lack of documentation and examples or just my goal to make some Alfresco Share customizations that cannot be easily accomplished).

What I am trying to accomplish:
Create a new content model and expose it via Share for create/import/edit functions (I use Alfresco 4.1.4 enterprise).
I tried lots of stuff and spent quite a lot of time on this. Searched for a solution for this problem (I can find some other posts, that describe similar problems I am facing, but there is no solution to them also). So far I have no luck with this task..

What I've done:
1. created a content model with a couple of custom properties (using alfresco docs and tutorial).
2. added share config file share-config-custom.xml (change actual namespace name with "<namespace>"):

      <config evaluator="string-compare" condition="DocumentLibrary">
         <type name="cm:content">
            <subtype name="<namespace>:doc" />
         <content id="plain-text" label="create-content.text" type="pagelink" index="10" icon="text">
            <param name="page">create-content?destination={nodeRef}&amp;itemId=<namespace>:doc&amp;mimeType=text/plain</param>
   <config evaluator="node-type" condition="<namespace>:doc">
   <!– copied this section from share-form-config.xml and added my custom properties –>

The result:
When I try to create new document for my custom content I get an error in catalina.log:
ERROR [scripts.forms.FormUIGet] [http-7000-6] org.alfresco.service.namespace.NamespaceException: Namespace prefix <namespace> is not mapped to a namespace URI

My questions:
1) Is there something I am missing (do you have to create some form template or some javascript or make some other configuration options for create/edit functions to work in Share)?
2) What does this error mean (there is no information anywhere how to map a namespace prefix with an uri)?
3) Can I use Share at all for my customization needs (if I will manage to get custom metadata form to work, I will need this form to show up for imported documents too)

Any help will be greatly appreciated!

Best regards,