Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-29449

Cannot read property 'innerHTML' of null on upload in ezimage, ezmedia & ezbinaryfile

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.2.2
    • Component/s: None
    • Labels:
    • Environment:

      ezplatform metarepo
      master: commit 959ec5a
      (symfony 3.4.13)

      Description

      "Cannot read property 'innerHTML' of null" error occurs when uploading a file in ezimage, ezmedia & ezbinaryfile fields.

      Steps to reproduce:
      1. Go to Content -> Content Structure
      2. Click Create and select Media -> Image
      3. Fill name, upload an image and select "Publish"

      Expected:
      Content is published

      Actual:
      Content is not published. Following JS error is visible in the console:

      de4fba8.js:1017 Uncaught TypeError: Cannot read property 'innerHTML' of null
          at EzImageFieldValidator.validateInput (de4fba8.js:1017)
          at EzImageFieldValidator.validateField (de4fba8.js:927)
          at fieldsToValidate.forEach.field (de4fba8.js:990)
          at Array.forEach (<anonymous>)
          at EzImageFieldValidator.isValid (de4fba8.js:988)
          at validators.map.validator (de4fba8.js:743)
          at Array.map (<anonymous>)
          at HTMLButtonElement.clickHandler (de4fba8.js:743)
          at HTMLButtonElement.trigger (5558115.js:949)
      
      Update: It affects also ezmedia and ezbinaryfile field type

      Steps to reproduce:
      1. Create Content Type with ezbinaryfile or ezmedia, non-required
      2. Go to Content -> Content Structure
      3. Click Create and select CT from step 1
      4. Click "Publish"
      ezmedia:

      de4fba8_base-file-field_7.js:16 Uncaught TypeError: Cannot read property 'innerHTML' of null
          at BaseFileFieldValidator.validateInput (de4fba8_base-file-field_7.js:16)
          at BaseFileFieldValidator.validateField (de4fba8_base-field_6.js:170)
          at fieldsToValidate.forEach.field (de4fba8_base-field_6.js:233)
          at Array.forEach (<anonymous>)
          at BaseFileFieldValidator.isValid (de4fba8_base-field_6.js:231)
          at validators.map.validator (de4fba8_admin.content.edit_5.js:13)
          at Array.map (<anonymous>)
          at HTMLButtonElement.clickHandler (de4fba8_admin.content.edit_5.js:13)
          at HTMLButtonElement.trigger (cccf785_button.trigger_2.js:9)
      

      ezbinaryfile:

      de4fba8_base-file-field_7.js:16 Uncaught TypeError: Cannot read property 'innerHTML' of null
          at BaseFileFieldValidator.validateInput (de4fba8_base-file-field_7.js:16)
          at BaseFileFieldValidator.validateField (de4fba8_base-field_6.js:170)
          at fieldsToValidate.forEach.field (de4fba8_base-field_6.js:233)
          at Array.forEach (<anonymous>)
          at BaseFileFieldValidator.isValid (de4fba8_base-field_6.js:231)
          at validators.map.validator (de4fba8_admin.content.edit_5.js:13)
          at Array.map (<anonymous>)
          at HTMLButtonElement.clickHandler (de4fba8_admin.content.edit_5.js:13)
          at HTMLButtonElement.trigger (cccf785_button.trigger_2.js:9)
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              michal.szoltysek@ez.no Michał Szołtysek
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: