cancel
Showing results for 
Search instead for 
Did you mean: 

'View in Browser' for share custom model

sradha
Champ on-the-rise
Champ on-the-rise
Hi,

I have created a custom model node-type and model-type of my:document.After that while create a content using the custom model ,the preview is coming as" the document has no content".Also i am trying to click on "View in browser" button ,it is showing error as :-

Web Script Status 404 - Not Found

The Web Script /alfresco/s/api/node/content/workspace/SpacesStore/84613df7-20c5-4277-967c-5b0639be6a54/Sample has responded with a status of 404 - Not Found.

404 Description:   Requested resource is not available.

Message:   08040002 Unable to locate content for node ref workspace://SpacesStore/84613df7-20c5-4277-967c-5b0639be6a54 (property: {http://www.alfresco.org/model/content/1.0}content)
   
Exception:   org.springframework.extensions.webscripts.WebScriptException - 08040002 Unable to locate content for node ref workspace://SpacesStore/84613df7-20c5-4277-967c-5b0639be6a54 (property: {http://www.alfresco.org/model/content/1.0}content)


Can anybody put some light on it?
12 REPLIES 12

mitpatoliya
Star Collaborator
Star Collaborator
Check out in your node browser that node with this noderef is exist in your alfresco or not?
workspace://SpacesStore/84613df7-20c5-4277-967c-5b0639be6a54

sradha
Champ on-the-rise
Champ on-the-rise
Hi,

I am very new to alfresco.Can you please help me out how to check that? if not present,then what to do ? please help.

mitpatoliya
Star Collaborator
Star Collaborator

sradha
Champ on-the-rise
Champ on-the-rise
Hi,

I have checked in node browser.The node ref is present.But still on clicking of "view in browser" giving  same exception as in my last post.
Please suggest.

mikeh
Star Contributor
Star Contributor
Does your custom model derive from cm:cmobject, or cm:content? In other words does the node you create of your custom type have a cm:content property at all?

Thanks.
Mike

sradha
Champ on-the-rise
Champ on-the-rise
Hi Mike,

Yes my custom model has cm:content.I am posting my custom model.xml code :::


                                              <type name="my:document">
         <title>My BaseContent </title>
         <parent>cm:content</parent>         
         <properties>
            <property name="my:customId">
               <title>Custom Id</title>
               <type>d:text</type>                       
            </property>
            <property name="my:uniqueText">
               <title>Unique Text</title>
               <type>d:text</type>                                   
            </property>   
         </properties>         
      </type>



=================================================================================

Please suggest

mitpatoliya
Star Collaborator
Star Collaborator
Looking at your model it shows it contain cm:content as parent so it should work fine.
any other errors in the logs?

sradha
Champ on-the-rise
Champ on-the-rise
Hi Mits,

I had recreated my custom mdel.I went to  http://localhost:8080/share/page/modules/deploy to deply my custom module.But still my "view in browser is showing error.I am posting the error:
===================================================================================================

Web Script Status 404 - Not Found

The Web Script /alfresco/s/api/node/content/workspace/SpacesStore/049864f9-8820-4719-959d-c44adb5f02a6/Sample1 has responded with a status of 404 - Not Found.

404 Description: Requested resource is not available.
 
Message: 08050004 Unable to locate content for node ref workspace://SpacesStore/049864f9-8820-4719-959d-c44adb5f02a6 (property: {http://www.alfresco.org/model/content/1.0}content)
  
Exception: org.springframework.extensions.webscripts.WebScriptException - 08050004 Unable to locate content for node ref workspace://SpacesStore/049864f9-8820-4719-959d-c44adb5f02a6 (property: {http://www.alfresco.org/model/content/1.0}content)


=====================================================================

Then i searched for the node in node browser and got the following meassage


Search failed due to: org.alfresco.error.AlfrescoRuntimeException: 08050031 Node workspace://SpacesStore/049864f9-8820-4719-959d-c44adb5f02a6 does not exist.

One more thing,all the properties in my content model is of "text field" type not of original content type which is of textarea type.Is it the real problem?

Please suggest what to do in this case.


Thanks,
Sradha

mitpatoliya
Star Collaborator
Star Collaborator
Hey did you check your logs?
Is there any other errors in log?
Post if there are any.