Problem/Motivation

When selecting an asset, a javascript error is logged, at the asset is not selected.

Steps to reproduce

Follow the instructions to configue.
Once the Keepicker is open, select an asset.
Nothing appears to happen, but a JS error is logged.

Uncaught TypeError: event.detail.element.permalinks.find(...) is undefined
addKeepickerEventListener https://orange.ddev.site/modules/contrib/keepeek/js/global.js?v=1.0.0:86

Proposed resolution

From debugging, I can see that in line 86 of global.js, the code is looking for the 'whr' version of the asset.
However, in the network response from the keepeek server, the WHR value is returned, but by the time we get to that part of the code, the whr value is nor present in permalinks.

code

Remaining tasks

Adjust the code in the Keepicker such that the WHR value is available

User interface changes

n/a

API changes

n/a

Data model changes

n/a

Comments

alanburke created an issue. See original summary.

keepeek_dam’s picture

Does this behavior occur on all types of users? (manager, contributor, visitor, etc.)

We suspect a problem with the rights of the user who would not have access to the WHR format of the image, and if this is the case, we will set up a mechanism to get another image format.

Can you provide us with the login of the user used to reproduce this case?

keepeek_dam’s picture

Assigned: Unassigned » keepeek_dam
Status: Active » Fixed

Fixed in version 1.0.1

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.