How to fix the infinite wheel error on saving an attribute's options in the backend?

02

The browser’s console shows the error: «Uncaught TypeError: this.trigger is not a function»:

03

The corresponding AJAX request /catalog/product_attribute/validate/attribute_id/158/?isAjax=true ends with the error: «Input variables exceeded 1000. To increase the limit change max_input_vars in php.ini».

So the solution is to increase the max_input_vars PHP option.

Magento does not mention it in its official documentation: devdocs.magento.com/guides/v2.2/install-gde/prereq/php-settings.html