Guide
Button not working after publish: why it does nothing on the live site
How this guide was made: Written with AI assistance and checked against the sources linked on this page.
Updated
Short answer: a button that works in the preview but does nothing after publish usually hits a script error from a setting missing on the live site, a request blocked by a database rule or sign-in, or an overlay covering it. Open the live page's console, press the button, and fix what the first red error names.
Why it happens
A button that does nothing is almost always one of four things.
Possible causes
- A script error when it is pressed: the code reads something that exists in the preview but not live, such as a setting, a signed-in user or a value from the address.
- The request behind it fails: a key or address set only for the preview, a database rule that blocks the write, or a visitor who is not signed in when the action needs it.
- Something covers it: a cookie notice, chat bubble, popup or invisible layer takes the click.
- On a phone it is too small, under another element, or below the bottom edge of the screen.
How do I fix a button that does nothing on the live site?
- Open the live site in a private window, open the browser console (in Chrome: right-click, Inspect, Console), press the button and read the first red error. An error such as "Cannot read properties of undefined" or "supabaseUrl is required" names the missing value or setting. Add the setting where your builder or host keeps the published app's settings, then publish again.
- Open the Network tab, press the button again and look at the request it sends. A 401 or 403 means the visitor is not signed in or a database rule blocks the write; a 404 means the address points at the preview; a failed request with "CORS" in the console means the server does not accept your live domain.
- If nothing appears in the console or Network tab, something is covering the button. Right-click the button and choose Inspect: if the highlighted element is a banner, chat widget or empty layer instead of the button, close or move that element, or give the button's area a higher z-index.
- On a phone, use the device toolbar in DevTools (Ctrl+Shift+M) and check the button is visible, not under a fixed footer or cookie bar, and at least 24 by 24 pixels.
- Re-test signed out, in a private window, on the live address, after every publish.
You can't see it yourself
You're signed in, your customers aren't. You are signed in and on a large screen, with nothing covering the button. Most visitors do not tell you; they just leave.
Related: Customers can't pay on my app: the pay button does nothing, or the order never shows up · Data won't save: "new row violates row-level security policy" · It works in the preview but breaks after I deploy
VibeFix is independent. Lovable, Bolt, Replit, Base44, v0, Supabase, Firebase, Stripe and Vercel are trademarks of their owners.
More guides · Shopify store accessibility · About · Your privacy choices