0

In Magento 1.8.1.0 the button for layout update at CMS > Widgets does not work any longer. According to the Chrome Developer Tools it has to do with javascript and the notice I get is:

Uncaught ReferenceError: WidgetInstance is not definedonclick @ (index):997

What would cause such an error?

1

I had the same problem on Magento 1.9.2.4. Turns out that the page cannot load correctly because of the translation: a string uses invalid characters.

Try switching the admin language to default English and see if the "Layout updates" section loads correctly. If yes, check the error console: the error that you mentioned will not be present any more.

In this case, switch back to your admin language and look for the following error in console: "Uncaught SyntaxError: Unexpected identifier"

Examine the referenced row, it contains the invalid string. Edit/remove it from the translation. Clear cache and reload page. When all invalid characters are removed from the translated string(s), the page will load correctly.

1

May be your /magento/js/prototype/validation.js is corrupted.

Just replace it with the original version from backup files or from fresh Magento and it will works.

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.