Gallery/Dynamic Page/Dataset Link Error

First of all, thank you to anyone who can help in the slightest with this issue. My company’s website which I help manage is having some technical difficulties with our project gallery page linking back to individual project pages. The individual pages are set up using a dynamic page and dataset, which are then loaded into a gallery on the main project gallery page. When someone clicks on an image of a project on the main page it is meant to redirect them to the individual project page. I was not the one to originally assemble the website or these pages but I’ve looked at every setting I can think of and the only clue I can find is this error code which appears in preview mode:

“Wix code SDK error: The name parameter that is passed to the openLightbox method cannot be set to the value . It must be of type string.”

I’ve tried to research this, but all the answers I’ve found related to this are explained in code, which I do not know so I can’t make any sense of them.

The odd thing is that when I go back thru and check links then republish the page if I navigate to the main project page and click on a project it will work, but only the first time. It will open a new window with the individual project page but if I then navigate back and try again, even for the same project, it just enlarges the image rather than going to the project page.

“Wix code SDK error: The name parameter that is passed to the openLightbox method cannot be set to the value. It must be of type string.”

The link for the lightbox in the openLightbox function must be the name of the lightbox itself, hence the must be of type string error.

https://www.wix.com/corvid/reference/wix-window.html#openLightbox