Code works fine in preview mode but not on live site

Hi,
I created a custom private member page to display member’s requests and status of their requests. Also depending on the status, various buttons will be displayed for repeater items. I also placed 2 buttons on top of repeaters which display the data accordingly.

The code works perfectly fine in the preview mode, but not on the live site. The same code worked perfectly fine till yesterday even on the live site. I don’t understand what the issue is. Can someone help me out.

Thanks in advance.

I have also had this happen to me. I scream and want to pull out my hair. I did notice that I sometimes got the web page behaving differently depending on the browser I was using, or even the device I was using. For example the page didn’t work in Chrome, but would work in Edge or Firefox. I’ve had a colleague try it and it would work fine on their PC, but it didn’t want to work on mine. Another quirk that I can’t explain, is that I can sometimes get the code to work when I use the ‘New Incognito window’ in Chrome, or ‘New Private Window’ in Firefox. I know this is not what you want to hear, but did you try to ‘restart/reboot’ your device that you are using to display the page on. I’ve had cookies that were somehow interfering with the functioning of the buttons, and restarting, fixed my browser issues.

Oops, forgot one obvious question, you did re’Publish’ the code changes?

I was thinking about this problem while walking my dog, and another thing came to mind. ‘PERMISSIONS’. I been bitten by the permissions issue with collections(tables). Things work fine in preview, but the data does not get returned, when viewing the live site. You say that you are using dropdowns to drive the repeater items that are being displayed. Do you fill the dropdowns from data from a collection? Are the dropdown values displaying properly?

@pekrzyz
Thanks for your reply. I got it fixed by myself. I did a small mistake in the code wherein I defined the dataset count before $w.onReady. Now I placed it inside dataset.onReady and everything works fine.