Pro Gallery onItemClicked is not working properly, items are undefined

Hello everyone,

I’ve a problem with the Pro Gallery. My task is to create a gallery, which is connected to a database. When the user clicks on one of the images, i want to get the title of the image and set a filter to another dataset, based on the title.
To do that, i added an onClick event to the gallery, which is supposed to get the title and stores it in localStorage.


The problem is, the log message always says “Title: undefined”
I also tried the work arounds of these discussions(below), but nothing seems to work.
https://www.wix.com/corvid/forum/community-discussion/pro-gallery-onitemclicked-oncurrentitemchanged-not-working
https://www.wix.com/corvid/forum/community-discussion/wix-pro-gallery-onitemclicked-not-working


The console says, that the onItemClicked function can not be used on this selector.
Than I tried to find out the attributes of the event item and got this:


In comparison, this is what an image event item looks, when connected to the same database:

My question:
Is there any other way to get some information about the item that was clicked? Any identifier would help(ID, title, etc.).
Or is there even a better alternative to do what i described above? It seems that I’m not the only one experiencing this problem.

Thanks in advance!
Leo

Try just using a gallery and not the Wix Pro Gallery.

Doesn’t work either. I can’t even get the onClick event to recognise the click, so it’s not called when someone clicks on an image.