cancel
Showing results for 
Search instead for 
Did you mean: 

Assets automatically being changed to ws:article

iann
Champ in-the-making
Champ in-the-making
When I move content into the quick start root, the document type is automatically changed to ws:article, I've created some custom types that inherit from ws:article that I'd hoped to use for extra properties on specific pages.

Is there any way of stopping this or would the best workaround be to use aspects for additional properties?
8 REPLIES 8

iann
Champ in-the-making
Champ in-the-making
Answer courtesy of Brian Remmington:

If you are working from a fairly recent build from HEAD then there is a simple "set" bean that you can override. This contains the set of types that you would prefer us not to mess with. The default is:


    <bean id="wqsmodule_sectionTypesToIgnore" class="java.util.TreeSet">
       <constructor-arg>
          <set>
             <value>ws:visitorFeedback</value>
             <value>ws:indexPage</value>
          </set>
        </constructor-arg>
    </bean>
   

Place your replacement bean in a context file somewhere in the classpath "alfresco/extension/*-context.xml" as normal. Ensure the two default types remain in the set.

iann
Champ in-the-making
Champ in-the-making
Works perfectly, the only remaining issue is that when I load the page with the new type up, it loads without any of the surrounding HTML, it's just the content item itself loading.

bremmington
Champ on-the-rise
Champ on-the-rise
What is the type hierarchy for your new type? What are the template mappings specified on the section hierarchy from the site root down to your asset's section?

iann
Champ in-the-making
Champ in-the-making
Hi Brian,

To keep things simple i've left the template mappings as they were 'ws:indexPage=sectionpage2,ws:article=articlepage2'

I also have a page with ws:article in the same folder, this renders correctly.

I've added the type wsSmiley Tongueressrelease with the following configurations:

        <type name="wsSmiley Tongueressrelease">
            <title>Press Release</title>
            <parent>ws:article</parent>
            <properties>
            <property name="ws:subheading">
               <type>d:text</type>
            </property>
            </properties>
            <mandatory-aspects>
                <aspect>ws:webasset</aspect>
            </mandatory-aspects>
        </type>

And..

   <config evaluator="node-type" condition="wsSmiley Tongueressrelease">
      <property-sheet>
         <show-association name="wsSmiley TonguerimaryImage" />
         <show-association name="ws:secondaryImage" />
         <show-association name="ws:relatedArticles" />
      </property-sheet>
   </config>

Viewing them side by side in the node browser shows that everything's the same (all have the sames aspects etc) the only difference appears to be the type, is there somewhere that I need to edit to allow for additional types to be rendered?

bremmington
Champ on-the-rise
Champ on-the-rise
Ian

I've tried this out and identified a bug in the CMIS implementation. I've raised this in JIRA as ALF-5339 (http://issues.alfresco.com/jira/browse/ALF-5339). We have found a fix for it already which is currently being tested and should appear on HEAD later today. Sorry for the inconvenience.

iann
Champ in-the-making
Champ in-the-making
Thanks for the quick response _ i'll look forward to testing the fix.

bremmington
Champ on-the-rise
Champ on-the-rise
I committed the fix onto HEAD a little earlier. Please would you try it out and let me know if it fixes the problem for you?

iann
Champ in-the-making
Champ in-the-making
Hi Brian,

Yes thanks - all working nicely.