From fda91bbea6831bccbf3b74c399b997a8ff7a2273 Mon Sep 17 00:00:00 2001 From: giles Date: Tue, 10 Feb 2026 01:43:25 +0000 Subject: [PATCH] fix: guard _meta.html against missing post variable Calendar templates extend post/index.html but don't provide a post context variable. Wrap post-specific meta in an if guard so pages without post still get basic meta from meta_base.html. Co-Authored-By: Claude Opus 4.6 --- suma_browser/templates/_types/post/_meta.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/suma_browser/templates/_types/post/_meta.html b/suma_browser/templates/_types/post/_meta.html index c4ef2ad..fc752d4 100644 --- a/suma_browser/templates/_types/post/_meta.html +++ b/suma_browser/templates/_types/post/_meta.html @@ -2,6 +2,9 @@ {# Context expected: site, post, request #} +{% if post is not defined %} + {% include 'social/meta_base.html' %} +{% else %} {# Visibility → robots #} {% set is_public = (post.visibility == 'public') %} @@ -122,3 +125,4 @@ +{% endif %}