Skip to content

fix(header,footer): remove fragment loading antipattern#22

Merged
benpeter merged 2 commits intomainfrom
fix/remove-fragment-antipattern
Mar 13, 2026
Merged

fix(header,footer): remove fragment loading antipattern#22
benpeter merged 2 commits intomainfrom
fix/remove-fragment-antipattern

Conversation

@benpeter
Copy link
Owner

@benpeter benpeter commented Mar 13, 2026

Summary

  • Removed loadFragment() / getMetadata() calls from header and footer blocks — they fetched CMS pages (/nav, /footer) that don't exist, causing 404 requests on live and a footer crash (no null guard)
  • Inlined static content directly: logo text, tagline, and footer copyright/links
  • Deleted nav.plain.html and footer.plain.html stub files and the *.plain.html hlxignore rule they required

Test plan

  • Header renders logo + tagline with corruption filter
  • Footer renders © 2026 Ben Peter · Legal Notice · Privacy Policy
  • No 404 requests for /nav.plain.html or /footer.plain.html in network tab
  • npm run lint passes

Test URLs:

🤖 Generated with Claude Code

Header and footer loaded fragments from CMS pages that don't exist,
causing 404 requests on live and a crash in the footer (no null guard).
The content is static — inline it directly and delete the stub files.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Signed-off-by: Ben Peter <bp@ben-peter.com>
@aem-code-sync
Copy link

aem-code-sync bot commented Mar 13, 2026

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
In case there are problems, just click a checkbox below to rerun the respective action.

  • Re-run PSI checks
  • Re-sync branch
Commits

@aem-code-sync
Copy link

aem-code-sync bot commented Mar 13, 2026

Page Scores Audits Google
📱 / PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI
🖥️ / PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Signed-off-by: Ben Peter <bp@ben-peter.com>
@benpeter benpeter merged commit b37757b into main Mar 13, 2026
2 checks passed
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.

2 participants