From 5824981e2b5aaa792e3fa7ccfd17553ad1f3a0a8 Mon Sep 17 00:00:00 2001 From: Oliver Rasche Date: Wed, 11 Nov 2026 10:11:32 +0100 Subject: [PATCH] Overview-Import: Why-VITEC-Karten als icon_card (0106-FE) Der erste Lauf (5bm) legte die neuen Why-VITEC-Baender auf 9 Uebersichts- seiten als text_only an - das Frontend baut das Icon-Band nur aus icon_card. Importer legt neue Band-Karten jetzt als icon_card (ohne Icon) an und stellt vorhandene Band-Karten beim Re-Run um; 36 Karten repariert, Seiten gepurgt. Co-Authored-By: Claude Fable 5.1 --- .../ImportProductOverviewWorkbooksCommand.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/packages/vitec/Classes/Command/ImportProductOverviewWorkbooksCommand.php b/packages/vitec/Classes/Command/ImportProductOverviewWorkbooksCommand.php index cbe7fe0..a83dbf8 100644 --- a/packages/vitec/Classes/Command/ImportProductOverviewWorkbooksCommand.php +++ b/packages/vitec/Classes/Command/ImportProductOverviewWorkbooksCommand.php @@ -37,7 +37,10 @@ use TYPO3\CMS\Core\Utility\GeneralUtility; * whose title matches the benefit heading (theme match * like vitec:build-why-vitec-bands), unmatched benefits * are REPORTED only (the band is the agency's icon set); - * page without band: NEW band of text_only cards + * page without band: NEW band of icon_card cards without + * icon (0106-FE: the frontend builds the band from + * icon_card only - text_only cards fall apart; a band + * card still carrying text_only is repaired on re-run) * 04 COMPARISON -> skipped unless --comparison: the workbook holds no * specifications ("populate from approved datasheets"), * only the card descriptions again @@ -211,6 +214,10 @@ final class ImportProductOverviewWorkbooksCommand extends Command continue; } $used[(string)$match['uid']] = true; + if ((string)$match['vitec_layout_variant'] !== 'icon_card') { + // 0106-FE: band cards must be icon_card (first run wrote text_only) + $this->update((string)$match['uid'], $match, ['vitec_layout_variant' => 'icon_card'], 'why card "' . $match['header'] . '" -> icon_card'); + } if (trim(strip_tags((string)$match['bodytext'])) !== '' && $this->norm(strip_tags((string)$match['bodytext'])) !== $this->norm($benefit['body'])) { $this->report[] = 'why: card "' . $match['header'] . '" already has own text - left as is'; continue; @@ -222,11 +229,11 @@ final class ImportProductOverviewWorkbooksCommand extends Command $whyIds[] = $id; foreach ($wb['why']['benefits'] as $benefit) { $whyIds[] = $this->create($pageUid, 'vitec_card', [ - 'vitec_layout_variant' => 'text_only', + 'vitec_layout_variant' => 'icon_card', 'header' => $benefit['heading'], 'bodytext' => $this->p($benefit['body']), 'vitec_primary_cta_label' => '', - ], 'why: NEW card "' . $benefit['heading'] . '"'); + ], 'why: NEW card "' . $benefit['heading'] . '" (icon_card, no icon)'); } }