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

The event pictureViewsGenerationDone fires twice in LTS 2021, once in LTS 2019

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2021.28
    • Fix Version/s: 2023.0, 2021.31
    • Component/s: Automation
    • Environment:
      macOS

      Description

      When uploading an image via WebUI, the `pictureViewsGenerationDone` event is fired once in LTS 2019, and twice in LTS 2021.

      To reproduce:

      • In your IDE set a breakpoint inside `org.nuxeo.ecm.platform.picture.recompute.RecomputeViewsAction.compute()` on the `fireEvent` call.
      • Launch a Nuxeo server with WebUI installed and attach your debugger
      • Login to WebUI
      • Create a Workspace
      • Drag and drop an image into the workspace

      Notes:

      While debugging I noticed that `compute()` runs with a different user each time. One call has the session of the current user. The other call has the session of the `system` user (see screenshots). The order is not consistent, in one project the user comes first, in another project system comes first.

      Why is this a problem? If you have an event handler, they run in parallel so it makes any business logic pretty wonky.

        Attachments

        1. jane.png
          1.20 MB
          Joshua Fletcher
        2. system.png
          1.20 MB
          Joshua Fletcher

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: