magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.59k stars 9.32k forks source link

«TypeError: this.trigger is not a function» in lib/web/mage/backend/validation.js #10758

Closed zzvara closed 7 years ago

zzvara commented 7 years ago

Preconditions

  1. Magento 2.1.8 CE release
  2. PHP 7.0.8-0ubuntu0.16.04.3 (cli) ( NTS ) Copyright (c) 1997-2016 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies with Zend OPcache v7.0.8-0ubuntu0.16.04.3, Copyright (c) 1999-2016, by Zend Technologies
  3. Ver 14.14 Distrib 5.7.16, for Linux (x86_64) using EditLine wrapper

Steps to reproduce

  1. Have an attribute set with 131 attributes, 5 store views at least
  2. When there is only 1 store view, specifying an attribute set does not require the "admin" column to be specified.
  3. When there are 5 store views, the attribute set form can not be saved, due to "admin" column not being specified for all the 131 entries.
  4. Specify the 131 entries, and click on save.
  5. The page loads indefinitely, and JS shell reports: «TypeError: this.trigger is not a function»
  6. Go to "lib/web/mage/backend/validation.js" and update the corresponding problematic line to "$('body').trigger('processStop');"
  7. Repeat from 4. again. Magento will load, after 4 seconds, you will be redirected to Dashboard. The attribute set is not updated.

Expected result

  1. The attribute set should be updated.

Actual result

  1. JS error.

Running in a Docker container, with only the minimum required components and environment to run Magento.

zzvara commented 7 years ago

Is there any way to find the underlying error? I have checked the exception.log and other log files, there is nothing at the time of the error.

honeygarg commented 7 years ago

Please upgrade magento version 2.1.8 to 2.1.9. The issue is resolved in m2.1.9.

magento-engcom-team commented 7 years ago

Hi, @zzvara, thank you for your report, but we can not reproduce this issue with your "steps to reproduce". What do you mean under "admin" column on attribute set form? Maybe attribute form? We tried to do next:

  1. Create attribute with "dropdown" type.
  2. Specified 131 values for it(fill admin field for each).
  3. Click save.
  4. Attribute saved successfully.

Please provide more detailed steps to reproduce.

zzvara commented 7 years ago

Hi,

  1. We have swatch type or something like this.
  2. We also have 5 additional languages as store views.
  3. 5 additional languages have been added after 131 values have been specified in advance and saved.

By admin column I mean the attribute form, has (for each value) 5x2 input boxes, 2 for each store view and 2 additional which states "admin". On 2017-09-20 01:21:46, Magento Community Engineering notifications@github.com wrote: Hi, @zzvara [https://github.com/zzvara], thank you for your report, but we can not reproduce this issue with your "steps to reproduce". What do you mean under "admin" column on attribute set form? Maybe attribute form? We tried to do next:

magento-engcom-team commented 7 years ago

Hi, @zzvara again) thank you for your report.

So I did next steps(2.1.9 M2 version): 1.Go to Store->Attributes->Product->Add New Attribute.

  1. Pick attribute type "Visual Swatch" and add 131 values for it(admin value is required f57755f500c3932917378d8b261a100541ab50b0de62911345 pimgpsh_fullsize_distr ).
  2. Save attribute. Success message appeared.
  3. Add 4 more store views, so now i have 5 store views.
  4. Go to created attribute and try to save it.
  5. Success message appeared, attribute is saved.

Please correct my steps to reproduce if they are wrong. If they are right try to reproduce this issue on a clean installation.

zzvara commented 7 years ago

OK thanks, we will look into it again and try to experiment with it. Unfortunately there are no errors thrown. Where should I find for errors? Nothing in the exception logs. On 2017-09-21 08:21:23, Magento Community Engineering notifications@github.com wrote: Hi, @zzvara [https://github.com/zzvara] again) thank you for your report. So I did next steps(2.1.9 M2 version): 1.Go to Store->Attributes->Product->Add New Attribute.

  1. Pick attribute type "Visual Swatch" and add 131 values for it(admin value is required).
  2. Save attribute. Success message appeared.
  3. Add 4 more store views, so now i have 5 store views.
  4. Go to created attribute and try to save it.
  5. Success message appeared, attribute is saved. Please correct my steps to reproduce if they are wrong. If they are right try to reproduce this issue on a clean installation. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub [https://github.com/magento/magento2/issues/10758#issuecomment-331189352], or mute the thread [https://github.com/notifications/unsubscribe-auth/AH--TXBwFpd6d1_9JyNP4w94HbpqOjuVks5skn7jgaJpZM4PLL65].
magento-engcom-team commented 7 years ago

@zzvara, thank you for your report. We were not able to reproduce this issue by following the steps you provided. If you'd like to update it, please reopen the issue. We tested the issue on 2.1.9