Uploaded image for project: 'Nuxeo Elements'
  1. Nuxeo Elements
  2. ELEMENTS-1396

Fix display of a view using nuxeo-results-view

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.5
    • Fix Version/s: 3.1.x, 3.0.6
    • Component/s: Layouts

      Description

      Steps to reproduce :

      1. Define a page provider"mypp" in Studio with 2 predicates : ecm:parentId and dc:nature
      2. configure the form and results layouts for this page provider
        1. for the form, only keep the filter on Nature
        2. for the results, add a column to display dc:nature
      3. add this line to nuxeo-xxx-custom-bundle.html
        <nuxeo-slot-content name="documentCollapsiblePage" slot="DOCUMENT_VIEWS_PAGES" order="10">
          <template>
            <nuxeo-filter document="[[document]]" expression="document.facets.indexOf('Folderish') !== -1
                                                           &amp;&amp; document.type != 'Folder'">
              <template>
                <nuxeo-collapsible-document-page name="view" document="[[document]]"></nuxeo-collapsible-document-page>
              </template>
            </nuxeo-filter>
          </template>
        </nuxeo-slot-content>
        
        
        
        <nuxeo-slot-content name="myppViewPage" slot="DOCUMENT_VIEWS_PAGES">
          <template>
            <nuxeo-filter document="[[document]]" type="Folder">
              <template>
                <nuxeo-results-view show-filters provider="mypp" schemas="dublincore" search-name="mypp" params="{&quot;system_parentId&quot;:&quot;[[document.uid]]&quot;}" name="view"></nuxeo-results-view>
              </template>
            </nuxeo-filter>
          </template>
        </nuxeo-slot-content>
        
      4. Deploy the Studio package and start Nuxeo
      5. Create a Folder and create 2 File documents in it, with one File having dc:nature set to "Order"
      6. Navigate back to the Folder
      7. Observe the "0" in the Filters and this error in the console
        nuxeo-app.html-26.js:190 Uncaught TypeError: Cannot read property 'apply' of undefined
            at DomApi.proto.<computed> [as querySelector] (nuxeo-app.html-26.js:190)
            at HTMLElement._grabResults (elements.html-105.js:71)
            at HTMLElement._grabResults (elements.html-105.js:87)
            at HTMLElement._formChanged (elements.html-105.js:60)
            at HTMLElement.handler (nuxeo-app.html-12.js:79)
            at dispatchNotifyEvent (nuxeo-app.html-13.js:286)
            at Object.runNotifyEffect [as fn] (nuxeo-app.html-13.js:311)
            at runEffectsForProperty (nuxeo-app.html-13.js:142)
            at runNotifyEffects (nuxeo-app.html-13.js:229)
            at HTMLElement._propertiesChanged (nuxeo-app.html-13.js:1695)
        
      8. If you try to use the filter, the Search button does not work any more

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour, 15 minutes
                  1h 15m