Develop AI · Restaurants and cafes · Explain this error
Guide for restaurants and cafesExplain this error, for restaurants and cafes.
Your online menu page went blank and the console says "Unexpected token '<'". Paste it and I explain what it means and where to look.
What to give it
Start with what you have
- The exact console error
- The file the page loads, like menu.json
- What changed recently
What you get
Example for Saltbox Diner
Example · Saltbox Diner is a made-up business
You: Code help: Uncaught SyntaxError: Unexpected token '<' on our menu page Develop AI: DV6831: The page asked for menu.json and got a web page back (which starts with <). Usually the file moved or was renamed, so the server sent a "not found" page. Check the address in the code matches where menu.json is now. YES DV6831 to approve, EDIT DV6831 to change.
Then
What to do next
Today
Open the file's address
Paste it in a browser and see what comes back.
This week
Fix the path
Point the code at the right place.
Every week
Keep a backup menu
A plain HTML menu if the file fails.
More