Skip to content

Fix broken script loading on index and cart pages, empty about page, broken 404 CSS#233

Open
zen-ash-dev wants to merge 1 commit into
PatelHarsh2006:mainfrom
zen-ash-dev:main
Open

Fix broken script loading on index and cart pages, empty about page, broken 404 CSS#233
zen-ash-dev wants to merge 1 commit into
PatelHarsh2006:mainfrom
zen-ash-dev:main

Conversation

@zen-ash-dev
Copy link
Copy Markdown

@zen-ash-dev zen-ash-dev commented May 25, 2026

closes #232

The main page and cart page were both missing cart-manager.js and sanitization.js in their script tags. main.js calls both of these on startup, so without them the whole page silently breaks - the cart, the search bar, the filter buttons, the contact form, and the newsletter signup all fail with no obvious error to the user.

I found this because I was comparing pages trying to figure out why menu.html worked but index.html didn't. Turns out menu.html and orders.html already had the full set of scripts in the right order. The other two pages just didn't.

The fixes:

  • index.html: Added the missing sanitization.js and cart-manager.js tags. Removed the duplicate main.js (it was listed twice). Moved geolocation.js before main.js so the dependency chain is correct. The final order across all pages is now: accessibility.js → sanitization.js → cart-manager.js → geolocation.js → main.js.
  • cart.html: Same fix - added sanitization.js and cart-manager.js, fixed the order.
  • about.html: Was a 0-byte empty file. I set it up to redirect to index.html#about instead of writing duplicate content.
  • css/404.css: The selector food-trail was missing a dot. Changed it to .food-trail so the 404 page food emoji animation renders properly. Also cleaned up a stray double semicolon on the background gradient.
    To test: open index.html and check the console for errors. Add an item to the cart, use the search bar, click a filter button, submit the contact form. Then open cart.html - your items should be there and the checkout button should work. Hit the 404 page and the emoji trail should be centered and animated. Visit about.html and it should redirect.

…ization.js, remove duplicate main.js, fix 404.css selector, populate about.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Critical: Missing JS dependencies break cart, search, form validation, and order tracking on index.html and cart.html

1 participant