/
JavaScript error during link adding/editing [5.2.2-B1]

JavaScript error during link adding/editing [5.2.2-B1]

In-Portal catalog (the "Website & Content > Structure & Data" section) allows entering different kinds of data (e.g. pages, links, products) into different categories. There are permissions in place, that limit what kind of data can be added to what categories. For example, when administrator is trying to add record to category, where it's not allowed, then such category would be shown as disabled during item adding:

In case, when category permission was revoked after item was added, then attempt to edit such an item (to change a category for example) would result in a JavaScript error.

Solution

In the last IF in "disable_categories" JavaScript function adjust jQuery selector to build "option[value="..."]" string instead of "option[value='..."]" string (non-paired quotes were used).

Related Tasks