Skip to content

TypeError: Cannot read property 'label' of undefined (Line 171) #382

Closed

Description

@amici-infotech

Description of the problem

I had the weired issue on my EE site today. in MSM sites, File field not working. it shows me error on 171 line.

How To Reproduce
Steps to reproduce the behavior:

I have had many file fields including normal and in Grid. In main site, it works good. However in MSM site I get this error.

Environment Details:

  • Version: [5.3.0]
  • PHP Version [7.1]
  • OS: Linux
  • Web Server: Apache

Possible Solution

I found suspected code in file: themes/ee/asset/javascript/compressed/fields/file/drag_and_drop_upload.js

where it says:


{
    key: "getDirectoryName",
    value: function(e) {
        return "all" == e ? null : (e = EE.dragAndDrop.uploadDesinations.find(function(t) {
            return t.value == e
        }), e.label)
    }
}

e.label is not exists. I return e and it work for me.

image

Activity

  1. CapitalZ commented on Mar 18, 2020

    @CapitalZ

    Having the same issue at the moment. Hope someone has a fix. 👍

  2. amici-infotech commented on Mar 19, 2020

    @amici-infotech
    Author

    @CapitalZ solution is added in the thread already

  3. added a commit that references this issue on Mar 24, 2020
    8f3886d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions