[Evolution] Always verify console errors on ALL page types, not just homepage #112

Open
opened 2026-05-11 06:32:14 +00:00 by NW · 0 comments
Owner

Problem

The orchestrator declared the task complete after verifying console errors on the homepage only. Internal pages (product.php, shop.php, contact.php) still had JavaScript errors that were only discovered later.

Errors Found

  1. ReferenceError: fbq is not defined on product.php — Facebook Pixel initialization code failed because fbq() was called before fbevents.js loaded
  2. TypeError: header-sticky is null on all pages — custom.js tried to access document.getElementById("header-sticky") but the element was missing from theme9 header

Root Cause

The console error check (console-monitor) only checks homepage and admin-login. It does NOT check:

  • Product detail pages
  • Shop/category pages
  • Contact pages
  • Cart pages

Fix Applied

  1. Wrapped fbq initialization in proper Facebook Pixel stub that loads synchronously before calling fbq()
  2. Added id="header-sticky" to <header> element in layout.php

Rule for Future

ALWAYS verify console errors on ALL page types before finishing work.

Acceptance Criteria

  • Create a checklist in orchestrator rules for page-by-page console verification
  • Update console-error-monitor-standalone.js to test additional page types
  • Document this lesson in .kilo/logs/evolution-lessons.md
### Problem The orchestrator declared the task complete after verifying console errors on the homepage only. Internal pages (product.php, shop.php, contact.php) still had JavaScript errors that were only discovered later. ### Errors Found 1. **ReferenceError: fbq is not defined** on product.php — Facebook Pixel initialization code failed because `fbq()` was called before `fbevents.js` loaded 2. **TypeError: header-sticky is null** on all pages — `custom.js` tried to access `document.getElementById("header-sticky")` but the element was missing from theme9 header ### Root Cause The console error check (`console-monitor`) only checks homepage and admin-login. It does NOT check: - Product detail pages - Shop/category pages - Contact pages - Cart pages ### Fix Applied 1. Wrapped `fbq` initialization in proper Facebook Pixel stub that loads synchronously before calling `fbq()` 2. Added `id="header-sticky"` to `<header>` element in `layout.php` ### Rule for Future **ALWAYS verify console errors on ALL page types before finishing work.** ## Acceptance Criteria - [ ] Create a checklist in orchestrator rules for page-by-page console verification - [ ] Update `console-error-monitor-standalone.js` to test additional page types - [ ] Document this lesson in `.kilo/logs/evolution-lessons.md`
NW added the status::newpriority::mediumtype::enhancementevolution::new-workflow labels 2026-05-11 06:32:50 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: UniqueSoft/APAW#112