Internal Server Error (500) Dynamic Page not loading

When I click on the ‘View’ button on the repeater of my database page, the dynamic page that is supposed to open is not opening. In ‘Preview’ mode, I get a message in a dialog box that my users will see an error page as the page is not available due to an Internal Server Error (500). When I try to do the same action on the live site, nothing happens, no error page is displayed, the page just remains as it is, no matter how many times I click.
The problem arose out of the blue. Earlier, my code worked just fine, giving the desired functionality of allowing a user to go from a repeater (database page) to a dynamic item page and allowing users on the dynamic item page to add the item to a wishlist.
Now, however, there seems to be an issue, as the dynamic item page does not even open. I am attaching the screenshots below, please help.

This is what happens in ‘Preview’ mode:


This is what happens on the Live site:

Nothing happens! Page remains as it is, as though it is not linked to any dynamic page!

Please help with this!

https://support.wix.com/en/article/live-site-error-error-500-internal-server-error