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

Document creation failure leads, in WebUI, to a line corresponding to the root

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 9.10-HF13
    • Fix Version/s: None
    • Component/s: Core, Web UI

      Description

      (see the video)

      Step to reproduce:

      1. Have a listener for "About to Create". In the example, the listener is for File and a filter is added on the title to avoid any issue during hot reload
      2. In the chain ran for this listener, update a field and save the document. As we are in About to Create, saving will fail
      3. Deploy and in WebUI create such document (in the example, a File with the test title)

      The result is:

      • The paper-toast tip says the document was created (it was not)
      • The page displays an error
      • The worst part: once refreshing the content of the container, a line is added corresponding to the root

      You have no way to get rid of it. A restart does not change anytning.

      IMPORTANT During a training, a trainee has the issue but was even able to select and delet it, which is normal expectation, you have a blank line, you want to delete it. In 9.10HF13 and selecting the line, I don't have the "delete" action, but he had it.

      Notes:

      1. Tested on 10.2 and got the correct behavior (paper toast saying the doocument was not created)
      2. When doing the creation in JSF, the error is trigger and JSF display stays OK (no blank line), while when you go to WebUI you do have the root in the table view of the container. So even if the error was done from JSF, the wrong behavior is still visible.
      3. This is reproductible, but I don't know if other errors while saving in the db while generate the same behavior.
      4. Tagging only WebUI, but maybe it's also a bit of core and/or REST
      5. I also window.localStorage.clear() to check if the display off the line could be just some local storage badly tuned, but no, the line stays there

      Environment: Mac OS, HighSierra, zip package, embedded es and H2 database.

      The XML export of this line is the following (well, it's Root):

      <?xml version="1.0" encoding="UTF-8"?>
      
      <document repository="default" id="e41c3e9e-b998-4bc8-9118-1ff4c21570ff">
        <system>
          <type>Root</type>
          <path></path>
          <facet>Folderish</facet>
          <facet>NXTag</facet>
          <facet>NotCollectionMember</facet>
          <access-control>
            <acl name="local">
              <entry principal="Administrator" permission="Everything" grant="true"/>
              <entry principal="members" permission="Read" grant="true"/>
            </acl>
          </access-control>
        </system>
        <schema xmlns:common="http://www.nuxeo.org/ecm/schemas/common/" name="common"></schema>
        <schema xmlns:dc="http://www.nuxeo.org/ecm/schemas/dublincore/" name="dublincore"></schema>
        <schema xmlns:nxtag="http://www.nuxeo.org/ecm/schemas/facetedTag/" name="facetedTag">
          <nxtag:tags/>
        </schema>
      </document>
      

      Also, accessing the container via REST does not display this extra document, either via /api/v1/path/the/path/@children or via a search (SELECT * FROM DOCUMENT WHERE ecm:path STARTSWITH 'the/path'

        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 - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour
                  1h