From 2fabfc44458b7b7b83bee430fd77f956adfe3eee Mon Sep 17 00:00:00 2001 From: Marc Mintel Date: Wed, 25 Feb 2026 02:22:29 +0100 Subject: [PATCH] fix: extract full description from productTabs block content instead of showing short fallback --- app/[locale]/products/[...slug]/page.tsx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/app/[locale]/products/[...slug]/page.tsx b/app/[locale]/products/[...slug]/page.tsx index dd8be8e9..90c4812b 100644 --- a/app/[locale]/products/[...slug]/page.tsx +++ b/app/[locale]/products/[...slug]/page.tsx @@ -258,7 +258,7 @@ export default async function ProductPage({ params }: ProductPageProps) { (node.fields?.blockType === 'productTabs' || node.fields?.blockType === 'productTechnicalData'), ); - const descriptionChildren = rootChildren.filter( + let descriptionChildren = rootChildren.filter( (node: any) => !( node.type === 'block' && @@ -267,6 +267,16 @@ export default async function ProductPage({ params }: ProductPageProps) { ), ); + // If no standalone description nodes, extract from the productTabs block's embedded content + if (descriptionChildren.length === 0) { + const tabsBlock = rootChildren.find( + (node: any) => node.type === 'block' && node.fields?.blockType === 'productTabs', + ); + if (tabsBlock?.fields?.content?.root?.children) { + descriptionChildren = tabsBlock.fields.content.root.children; + } + } + const descriptionContent = { root: { ...product.content.root,