From e8c9fc7e7dab302bc366d7e3578637b2761a3dc1 Mon Sep 17 00:00:00 2001 From: Samir Boulahtit Date: Fri, 3 Apr 2026 18:51:19 +0200 Subject: [PATCH] fix(hosting): template buttons use 'text' to match CMS section macros MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The hero and CTA section macros expect button.text.translations but template JSONs used button.label.translations. Changed all 5 template homepage files: label → text in button objects. Also fixed existing CMS pages in DB (page 56) to match. Co-Authored-By: Claude Opus 4.6 (1M context) --- .../templates_library/auto-parts/pages/homepage.json | 6 +++--- .../templates_library/construction/pages/homepage.json | 6 +++--- .../hosting/templates_library/generic/pages/homepage.json | 4 ++-- .../professional-services/pages/homepage.json | 6 +++--- .../templates_library/restaurant/pages/homepage.json | 6 +++--- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/app/modules/hosting/templates_library/auto-parts/pages/homepage.json b/app/modules/hosting/templates_library/auto-parts/pages/homepage.json index 03e3847d..1103ba51 100644 --- a/app/modules/hosting/templates_library/auto-parts/pages/homepage.json +++ b/app/modules/hosting/templates_library/auto-parts/pages/homepage.json @@ -10,8 +10,8 @@ "subtitle": {"translations": {"en": "Your trusted auto parts specialist in {{city}}", "fr": "Votre spécialiste pièces auto de confiance à {{city}}"}}, "background_type": "image", "buttons": [ - {"label": {"translations": {"en": "Browse Parts", "fr": "Voir les pièces"}}, "url": "/catalog", "style": "primary"}, - {"label": {"translations": {"en": "Contact Us", "fr": "Contactez-nous"}}, "url": "/contact", "style": "secondary"} + {"text": {"translations": {"en": "Browse Parts", "fr": "Voir les pièces"}}, "url": "/catalog", "style": "primary"}, + {"text": {"translations": {"en": "Contact Us", "fr": "Contactez-nous"}}, "url": "/contact", "style": "secondary"} ] }, "features": { @@ -27,7 +27,7 @@ "enabled": true, "title": {"translations": {"en": "Need a specific part?", "fr": "Besoin d'une pièce spécifique ?"}}, "buttons": [ - {"label": {"translations": {"en": "Contact Us", "fr": "Contactez-nous"}}, "url": "/contact", "style": "primary"} + {"text": {"translations": {"en": "Contact Us", "fr": "Contactez-nous"}}, "url": "/contact", "style": "primary"} ] } } diff --git a/app/modules/hosting/templates_library/construction/pages/homepage.json b/app/modules/hosting/templates_library/construction/pages/homepage.json index 9df687d0..fe4e36c9 100644 --- a/app/modules/hosting/templates_library/construction/pages/homepage.json +++ b/app/modules/hosting/templates_library/construction/pages/homepage.json @@ -10,8 +10,8 @@ "subtitle": {"translations": {"en": "Quality construction and renovation in {{city}}", "fr": "Construction et rénovation de qualité à {{city}}"}}, "background_type": "image", "buttons": [ - {"label": {"translations": {"en": "Get a Free Quote", "fr": "Devis gratuit"}}, "url": "/contact", "style": "primary"}, - {"label": {"translations": {"en": "Our Projects", "fr": "Nos réalisations"}}, "url": "/projects", "style": "secondary"} + {"text": {"translations": {"en": "Get a Free Quote", "fr": "Devis gratuit"}}, "url": "/contact", "style": "primary"}, + {"text": {"translations": {"en": "Our Projects", "fr": "Nos réalisations"}}, "url": "/projects", "style": "secondary"} ] }, "features": { @@ -33,7 +33,7 @@ "enabled": true, "title": {"translations": {"en": "Ready to start your project?", "fr": "Prêt à démarrer votre projet ?"}}, "buttons": [ - {"label": {"translations": {"en": "Request a Quote", "fr": "Demander un devis"}}, "url": "/contact", "style": "primary"} + {"text": {"translations": {"en": "Request a Quote", "fr": "Demander un devis"}}, "url": "/contact", "style": "primary"} ] } } diff --git a/app/modules/hosting/templates_library/generic/pages/homepage.json b/app/modules/hosting/templates_library/generic/pages/homepage.json index eefebdb7..d1de691d 100644 --- a/app/modules/hosting/templates_library/generic/pages/homepage.json +++ b/app/modules/hosting/templates_library/generic/pages/homepage.json @@ -11,7 +11,7 @@ "subtitle": {"translations": {"en": "{{meta_description}}", "fr": "{{meta_description}}"}}, "background_type": "gradient", "buttons": [ - {"label": {"translations": {"en": "Contact Us", "fr": "Contactez-nous"}}, "url": "/contact", "style": "primary"} + {"text": {"translations": {"en": "Contact Us", "fr": "Contactez-nous"}}, "url": "/contact", "style": "primary"} ] }, "features": { @@ -28,7 +28,7 @@ "title": {"translations": {"en": "Ready to get started?", "fr": "Prêt à commencer ?"}}, "subtitle": {"translations": {"en": "Contact us today for a free consultation", "fr": "Contactez-nous pour une consultation gratuite"}}, "buttons": [ - {"label": {"translations": {"en": "Get in Touch", "fr": "Nous Contacter"}}, "url": "/contact", "style": "primary"} + {"text": {"translations": {"en": "Get in Touch", "fr": "Nous Contacter"}}, "url": "/contact", "style": "primary"} ] } } diff --git a/app/modules/hosting/templates_library/professional-services/pages/homepage.json b/app/modules/hosting/templates_library/professional-services/pages/homepage.json index f72cd74b..0c00b653 100644 --- a/app/modules/hosting/templates_library/professional-services/pages/homepage.json +++ b/app/modules/hosting/templates_library/professional-services/pages/homepage.json @@ -10,8 +10,8 @@ "subtitle": {"translations": {"en": "Professional expertise you can trust", "fr": "Une expertise professionnelle de confiance"}}, "background_type": "gradient", "buttons": [ - {"label": {"translations": {"en": "Book a Consultation", "fr": "Prendre rendez-vous"}}, "url": "/contact", "style": "primary"}, - {"label": {"translations": {"en": "Our Expertise", "fr": "Notre expertise"}}, "url": "/services", "style": "secondary"} + {"text": {"translations": {"en": "Book a Consultation", "fr": "Prendre rendez-vous"}}, "url": "/contact", "style": "primary"}, + {"text": {"translations": {"en": "Our Expertise", "fr": "Notre expertise"}}, "url": "/services", "style": "secondary"} ] }, "features": { @@ -27,7 +27,7 @@ "enabled": true, "title": {"translations": {"en": "Need professional guidance?", "fr": "Besoin d'un accompagnement professionnel ?"}}, "buttons": [ - {"label": {"translations": {"en": "Schedule a Meeting", "fr": "Planifier un rendez-vous"}}, "url": "/contact", "style": "primary"} + {"text": {"translations": {"en": "Schedule a Meeting", "fr": "Planifier un rendez-vous"}}, "url": "/contact", "style": "primary"} ] } } diff --git a/app/modules/hosting/templates_library/restaurant/pages/homepage.json b/app/modules/hosting/templates_library/restaurant/pages/homepage.json index b8943e7d..2b382aaa 100644 --- a/app/modules/hosting/templates_library/restaurant/pages/homepage.json +++ b/app/modules/hosting/templates_library/restaurant/pages/homepage.json @@ -10,8 +10,8 @@ "subtitle": {"translations": {"en": "A culinary experience in {{city}}", "fr": "Une expérience culinaire à {{city}}"}}, "background_type": "image", "buttons": [ - {"label": {"translations": {"en": "Reserve a Table", "fr": "Réserver une table"}}, "url": "/contact", "style": "primary"}, - {"label": {"translations": {"en": "See Our Menu", "fr": "Voir la carte"}}, "url": "/menu", "style": "secondary"} + {"text": {"translations": {"en": "Reserve a Table", "fr": "Réserver une table"}}, "url": "/contact", "style": "primary"}, + {"text": {"translations": {"en": "See Our Menu", "fr": "Voir la carte"}}, "url": "/menu", "style": "secondary"} ] }, "features": { @@ -32,7 +32,7 @@ "enabled": true, "title": {"translations": {"en": "Ready to dine with us?", "fr": "Prêt à nous rendre visite ?"}}, "buttons": [ - {"label": {"translations": {"en": "Make a Reservation", "fr": "Réserver"}}, "url": "/contact", "style": "primary"} + {"text": {"translations": {"en": "Make a Reservation", "fr": "Réserver"}}, "url": "/contact", "style": "primary"} ] } }