Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-14312

Open relative publication root name to document that extends Domain

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 5.8
    • Fix Version/s: 5.8.0-HF12, 5.9.4
    • Component/s: Publishing

      Description

      • I Create a new MyDomain type that extends Domain
      • I Create a root container named toto with Structure template
      • I contribute the following contribution
        <extension point="treeInstance" target="org.nuxeo.ecm.platform.publisher.impl.service.PublisherServiceImpl">
        
         <extension point="treeInstance" target="org.nuxeo.ecm.platform.publisher.impl.service.PublisherServiceImpl">
            <publicationTreeConfig factory="CoreProxyWithWorkflow" localSectionTree="true" name="MySection" title="MySection" tree="RootSectionsCoreTree">
              <parameters>
                <parameter name="RelativeRootPath">/toto</parameter>
                <parameter name="enableSnapshot">true</parameter>
                <parameter name="iconExpanded">/icons/folder_open.gif</parameter>
                <parameter name="iconCollapsed">/icons/folder.gif</parameter>
              </parameters>
            </publicationTreeConfig>
          </extension>
        

        Problem :
        My Section Tree is not displayed.
        This is because we just check the relative path for Domain doc and not extension, because in PublisherServiceImpl#registerPendingDescriptors we have this :

         List<DocumentModel> domains = new DomainsFinder(repositoryName).getDomains();
        

        And returne domains are used for the relative path search. If you look the query executed for the DomainFinder we have :

        SELECT * FROM Document WHERE ecm:primaryType = 'Domain'...
        

      Waiting behavior
      It would be more useful to have this request :

      SELECT * FROM Domain...
      

      Work around:
      Without this evolution you must set an absolute path in your descriptor

      <extension point="treeInstance" target="org.nuxeo.ecm.platform.publisher.impl.service.PublisherServiceImpl">
      
       <extension point="treeInstance" target="org.nuxeo.ecm.platform.publisher.impl.service.PublisherServiceImpl">
          <publicationTreeConfig factory="CoreProxyWithWorkflow" localSectionTree="true" name="MySection" title="MySection" tree="RootSectionsCoreTree">
            <parameters>
              <parameter name="RootPath">/mydomain/toto</parameter>
              <parameter name="enableSnapshot">true</parameter>
              <parameter name="iconExpanded">/icons/folder_open.gif</parameter>
              <parameter name="iconCollapsed">/icons/folder.gif</parameter>
            </parameters>
          </publicationTreeConfig>
        </extension>
      

      And for each instance of domain

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: