Uploaded image for project: 'Social Justice Repair Kit'
  1. Social Justice Repair Kit
  2. SJRK-400

singleFileUploader is undefined when removing media blocks

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Storytelling Tool UI
    • Labels:
      None
    • Environment:
      Infusion 3.0.0-dev.20200728T104627Z.e6aa1a341.FLUID-6145

      Description

      In certain (as yet unidentified) circumstances, when removing a media block (audio, image, video), the block editor's singleFileUploader component is undefined by the time sjrk.storyTelling.ui.storyEditor.removeSelectedBlocks() is called.

      This has only been observed in the tests for sjrk.storyTelling.ui.storyEditor and sjrk.storyTelling.base.page.storyEdit.

       

      To reproduce:

      1. Check out the tool at this exact commit: https://github.com/BlueSlug/sjrk-story-telling/tree/52e198dceae3e2aaa6a6e0334770cf9f25bdc6d5
      2. Run the site via a basic HTTP server such as Browsersync
      3. Navigate to the storyEditor browser tests: http://localhost:3000/tests/ui/html/ui-storyEditor-Tests.html

      Expected:

      Tests complete successfully

      Actual:

      The tests hang and an error is displayed on the developer console (see attached screenshot):

      ui-storyEditor.js:295 Uncaught TypeError: Cannot read property 'resetUploadState' of undefined
          at ui-storyEditor.js:295
          at Object.fluid.each (infusion-all.js:14543)
          at sjrk.storyTelling.ui.storyEditor.removeSelectedBlocks (ui-storyEditor.js:291)
          at togo (infusion-all.js:21310)
          at HTMLButtonElement.fire (infusion-all.js:15643)
          at HTMLButtonElement.dispatch (infusion-all.js:5189)
          at HTMLButtonElement.elemData.handle (infusion-all.js:4997)
          at Object.trigger (infusion-all.js:8255)
          at HTMLButtonElement.<anonymous> (infusion-all.js:8333)
          at Function.each (infusion-all.js:360)
      

        Attachments

        1. 2020-10-20 ST tests hanging.PNG
          53 kB
          Gregor Moss

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            gmoss Gregor Moss
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: