I am running Magento 2.2.3

When I try and go to admin/catalog/category/ and select a category it just spins and I get this javascript error.

Uncaught TypeError: value.map is not a function
at UiClass.setInitialValue (file-uploader.js:74)
at UiClass.initialize (abstract.js:73)
at UiClass.initialize (wrapper.js:109)
at new UiClass (class.js:49)
at Object.initComponent (layout.js:137)
at fire (jquery.js:3232)
at Object.fireWith [as resolveWith] (jquery.js:3362)
at Object.deferred.(/admin_1u9idw/catalog/category/edit/key/6bfefd3ede425d7d38ed258f6746c49ffc93015a1417f514ea0773cbf7c503ea/id/165/anonymous function) (http://magento.local/static/version1524775074/adminhtml/Magento/backend/en_US/jquery.js:3461:37)
at fire (jquery.js:3232)
at Object.fireWith [as resolveWith] (jquery.js:3362)

file-uploader.js is a core file I believe, and I have never touched it.

This is the code in the file that is giving me the error-

     * Defines initial value of the instance.
     * @returns {FileUploader} Chainable.
    setInitialValue: function () {
        var value = this.getInitialValue();

        value = value.map(this.processFile, this);

        this.initialValue = value.slice();

        this.on('value', this.onUpdate.bind(this));

        return this;

Specifically this line- value = value.map(this.processFile, this);

This is all core Magento and I have never touched any of the code. I have done the standard clear cache, clear browser, deploy static content, reindex, and remove static files.

I have made a child theme off the blank theme.

  • 1
    What format of image are you uploading ? – Vivek Kumar Jul 26 '18 at 21:14
  • Is it working fine for product image upload? – Vivek Kumar Jul 26 '18 at 21:14
  • @VivekKumar just checked. I tried both png and jpg, same result. Product image upload works fine. – tjjen Jul 26 '18 at 21:19
  • so .. the error is happening for only categories, is it happening for a specific category? – Vivek Kumar Jul 26 '18 at 21:21
  • All categories that were migrated from Magento 1. If it was created in Magento 2 it works fine. – tjjen Jul 26 '18 at 21:23

The problem is with Amasty Layered Navigation. If that is disabled everything works fine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.