JS problem in entity_browser acts differently per user role

Created on 9 August 2022, about 3 years ago
Updated 7 February 2023, over 2 years ago

JS problem in entity_browser acts differently per user role

Hi, we noticed that there are JS problem with entity_browser.
user with administrator role, JS in entity_browser works fine
user with other role, JS in entity_browser has problem. Product won't be selected after user click

Possible root cause

In developer console, saw this JS error for users without admin role

Uncaught ReferenceError: _ is not defined
    updateEntityIds http://20.apigee-dev-portal.docksal/modules/contrib/entity_browser/js/entity_browser.common.js?v=9.4.4:110
    selectionCompleted http://20.apigee-dev-portal.docksal/modules/contrib/entity_browser/js/entity_browser.common.js?v=9.4.4:60
    jQuery 7
    <anonymous> http://20.apigee-dev-portal.docksal/modules/contrib/entity_browser/js/entity_browser.modal_selection.js?v=9.4.4:15
    <anonymous> http://20.apigee-dev-portal.docksal/modules/contrib/entity_browser/js/entity_browser.modal_selection.js?v=9.4.4:22
entity_browser.common.js:110:5
    updateEntityIds http://20.apigee-dev-portal.docksal/modules/contrib/entity_browser/js/entity_browser.common.js?v=9.4.4:110
    selectionCompleted http://20.apigee-dev-portal.docksal/modules/contrib/entity_browser/js/entity_browser.common.js?v=9.4.4:60
    jQuery 7
    <anonymous> http://20.apigee-dev-portal.docksal/modules/contrib/entity_browser/js/entity_browser.modal_selection.js?v=9.4.4:15
    <anonymous> http://20.apigee-dev-portal.docksal/modules/contrib/entity_browser/js/entity_browser.modal_selection.js?v=9.4.4:22

In entity_browser.common.js:
// Ensure unique entities are selected.
combined_entities = _.unique(combined_entities);

We didn't change any role permission, plus, there are no role permission to control select product to apps.
please advice on how to fix this problem

User interface changes

no change

API changes

no change

Data model changes

no change

Release notes snippet

🐛 Bug report
Status

Active

Version

2.0

Component

Widget selector plugins

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024