Uploaded image for project: 'Nuxeo Studio'
  1. Nuxeo Studio
  2. NXS-5035

Slot contributions added to <PROJECT-NAME>-custom-bundle.html are ignored

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Cannot Reproduce
    • Affects Version/s: 73.24.5
    • Fix Version/s: None
    • Component/s: Studio Designer

      Description

      Steps to reproduce

      • Create a project
      • Add these contributions to your <PROJECT-NAME>-custom-bundle.html file
        <!-- Contribution of element 'nuxeo-se-picture-document-page' for slot 'DOCUMENT_VIEWS_PAGES' -->
        <nuxeo-slot-content name="pictureDocumentViewPage" slot="DOCUMENT_VIEWS_PAGES" order="5">
          <template>
            <nuxeo-filter document="[[document]]" type="Picture">
              <template>
                <nuxeo-se-picture-document-page name="view" document="[[document]]"></nuxeo-se-picture-document-page>
              </template>
            </nuxeo-filter>
          </template>
        </nuxeo-slot-content>
        
        <!-- Contribution of element 'nuxeo-download-button' for slot 'BLOB_ACTIONS' -->
        <nuxeo-slot-content name="downloadBlobAction" slot="BLOB_ACTIONS" order="30">
          <template>
          <nuxeo-filter document="[[document]]" 
                        expression="document.contextParameters
                                    && document.contextParameters.permissions
                                    && (document.contextParameters.permissions.indexOf('Download') !== -1
                                    || document.contextParameters.permissions.indexOf('Everything') !== -1
                                    || document.contextParameters.permissions.indexOf('Write') !== -1
                                    || document.contextParameters.permissions.indexOf('ReadWrite') !== -1)">  
            <template>
              <nuxeo-download-button document="[[document]]" xpath="[[xpath]]"></nuxeo-download-button>KOALA
            </template>
          </nuxeo-filter>
          </template>
        </nuxeo-slot-content>
        
      • The downloadBlobAction contribution is ignored and the default slot is used
      • Move these contributions to the <PROJECT-NAME>-bundle.html file
      • Deploy your changes
      • The downloadBlobAction contribution that we have overridden is now used.
        • You can easily validate it seeing that the word KOALA is not shown close to the download icon.
        • The <PROJECT-NAME>-custom-bundle.html file is imported from <PROJECT-NAME>-bundle.html file
          <link rel="import" href="nuxeo-lamborghini-poc-presales-custom-bundle.html">
          

      NOTE: When the pictureDocumentViewPage contribution is in the <PROJECT-NAME>-custom-bundle.html file is not always used (the default one is used in his place). You must empty the cache, or close the browser or use incognito navigation to see your changes.

      NOTE II: Nuxeo FT 10.2 used in this demo.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: