Prototype.js cannot save attribute in magento

I have this problem with Magento 1.7, I can’t save the attributes, the button turns gray and nothing happens.

In firebug I get this error message

TypeError: value.gsub is not a function value = value.gsub(/(\r)?\n/, '\r\n'); in prototype.js on line 5809 
+4
source share
1 answer

It looks like you are trying to serialize elements in a form, and one or more elements do not have a value attribute for reading.

There are 2 ways to fix it - either check all the elements of the form and make sure they have the value='' attribute at least.

OR

you can update the prototype.js file with some of the latest updates that have added checks to make sure the value attribute exists before trying to act on it.

https://github.com/jwestbrook/prototype/tree/master-w-updates/dist

+5
source

Source: https://habr.com/ru/post/1489649/


All Articles