NextCommerceCo / NextCommerceCo/spark
pages/page.html uses wrong context variable (flatpage instead of page) — store pages render empty
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 0
- Forks
- 1
- Avg merge
- 9h 52m
- Merged PRs (30d)
- 18
Description
Summary
templates/pages/page.html references {{ flatpage.title }} and {{ flatpage.content|safe }}, but the platform passes the page to this template as page (see the Template Contexts table in the objects reference; Intro Bootstrap uses page.title / page.content correctly).
DTL renders unknown variables as empty strings, so every store content page (Terms, Privacy, Contact, …) returns a 200 with the styled shell intact but a blank <title>, blank breadcrumb, blank <h1>, and no body content. Easy to miss in review — the page "loads fine".
History
Present since the initial commit (f0f8f1e8, 2026-03-20). The only subsequent change to the file (81cb6f68, "Localize Spark storefront copy", #23) touched the breadcrumb aria-label and kept flatpage. The name looks like a Django reflex — django.contrib.flatpages passes its page as flatpage — rather than the platform's actual page context.
Reproduction
On any Spark store with a published Page (e.g. /terms/): the rendered HTML contains <title> | {store} - </title> and an empty content div, despite the page having title and content in the admin.
Verified in production on a client store (babybub) 2026-08-06; replacing flatpage with page immediately restored title/breadcrumb/h1/content.
Fix
Replace the four flatpage references with page in templates/pages/page.html (lines 3, 11, 20, 22).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open templates/pages/page.html and inspect the four flatpage references on lines 3, 11, 20, and 22; compare them with the platform's Template Contexts table and Intro Bootstrap's page usage. Replace the references with the page context, then verify a published page such as /terms/ renders its title, breadcrumb, heading, and body content.
Written by the indexing model from the issue text.
Assessment
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 92/100