Back button Issue

Wix Code Forum,

On my music page https://www.psysopstudio.com/music, I have Pro Gallery binded to a dataset to retrieve all of my song data… I am then capturing the item click in a Pro Gallery and navigating the end-user to a dedicated song page with a song information and the Wix Music Player loaded with the song to play, etc… Here is the code to navigate to the page :

export function musicGallery_clicked(event) {
// Get clicked item tile (song name)
let itemTitle = event.item.title;
// Get base URL for site
let baseUrl = wixLocation.baseUrl;
// Navaigate to song page
wixLocation.to(baseUrl + itemTitle);
}

The issue is when I use the Back Button in the browser to return to the Music Page, the Pro Gallery doesn’t reload… It’s just spins and spins… But if I click on Music in the menu, which links to the music page, it load properly… Puzzling… Thoughts?

Thanks,
Marc

Hi Marc,

There is some issue with Pro Gallery load/reload items investigated. You can use another grid gallery to avoid time to time load gallery issue.

any of the onItemClicked or onItemChanged aren’t working at all still for the Pro Galleries. Its been a big pain…

Switch over to regular Grid galleries and you’ll be able to do what you’re mentioning. I’d do a simple console.log(“clicked”) to ensure your code is running. Also… to make things worse… in the Preview Mode, all the onItemClicked code works… but when published live, on the live site it doesn’t work at all. (you can verify this using the Javascript Console on your browser).