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

Disabling the recent document drawer breaks the delete document action

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 9.10-HF18, 10.10
    • Fix Version/s: 9.10-HF28, 10.10-HF02, 11.1
    • Component/s: Web UI

      Description

      If the recent document drawer slot contrib is disabled, the delete document action works but the application does not go back to the parent doc resulting in a confusing UX

      Uncaught TypeError: Cannot read property 'remove' of null
          at HTMLElement.<anonymous> (nuxeo-app.html:79388)
          at Array.forEach (<anonymous>)
          at HTMLElement._removeFromRecentlyViewed (nuxeo-app.html:79387)
          at HTMLElement._documentDeleted (nuxeo-app.html:79188)
          at HTMLElement.handler (nuxeo-app.html:2291)
          at op.execute.then (elements.html:17319)
      

      This happen in this function:
      https://github.com/nuxeo/nuxeo-web-ui/blob/68fba8c9a43c36d26583b4fd3492e9be5fbedf8a/elements/nuxeo-app.html#L1182

      The code does not check that this.$$('#recent') exists

      To reproduce:

      Disable the recent doc drawer

      <nuxeo-slot-content name="recentsDrawerItem" slot="DRAWER_ITEMS" order="20" priority="100" disabled></nuxeo-slot-content>
      <nuxeo-slot-content name="recentsDrawerPage" slot="DRAWER_PAGES" priority="100" disabled></nuxeo-slot-content>
      

      Add and Delete a document in webui

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 30 minutes
                  30m

                    PagerDuty

                    Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.