Files
VITEC-website/migrations/check_products_page2.php
orascheandClaude Fable 5 c6147d020e Fill the /products portfolio page from the agency workbook
- new vitec:build-product-portfolio (dry-run by default): hero, nine
  category sections (intro paragraphs with the exact sitemap H2s and
  Learn-more buttons onto the new category pages), 38 product cards
  with record-first link resolution (30 resolved; the 8 open record
  gaps stay reported), a Case Studies & Events banner (midnight,
  success stories / events), ONE vitec_faq accordion whose four
  questions are created as vitec_faq_items collection children
  (field names probed against the schema at runtime), and the orange
  prefooter banner (contact / solutions); full page properties and
  page layout 0 -> 1 "Index Page"
- diagnosis first (new read-only migrations/check_products_page.php
  and check_products_page2.php): the dry run reported zero legacy
  elements although the payload rendered ~40 - every own element of
  page 447 was already soft-deleted, the visible rendering came from
  the "Collection Product Infos" compose page. Building in place was
  therefore safe; unconsumed visible legacy would have been hidden,
  not deleted
- side finding, left open on purpose: six old-taxonomy category stubs
  (#451-454, #456, #458) still sit visible under /products with the
  family pages beneath them - hide/move/redirect is an editorial
  decision queued for Olli
- applied and verified live (hero, 9 category buttons, 30 card links,
  4 FAQ items, both banner CTA pairs, meta)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-10-27 14:12:39 +01:00

44 lines
1.9 KiB
PHP

<?php
declare(strict_types=1);
/**
* Diagnose part 2: page 448 (where the rendered /products elements live)
* plus every page whose slug starts with /products, and the visible
* element summary of 448.
*
* READ-ONLY. Usage: php migrations/check_products_page2.php
*/
error_reporting(E_ALL);
ini_set('display_errors', '1');
$root = null;
$dir = __DIR__;
for ($i = 0; $i < 5; $i++) {
if (is_file($dir . '/config/system/settings.php')) { $root = $dir; break; }
$dir = dirname($dir);
}
if ($root === null) { exit("no project root\n"); }
$settings = require $root . '/config/system/settings.php';
$db = $settings['DB']['Connections']['Default'];
$pdo = new PDO(
sprintf('mysql:host=%s;port=%s;dbname=%s;charset=utf8mb4', $db['host'] ?? 'localhost', $db['port'] ?? 3306, $db['dbname'] ?? ''),
$db['user'] ?? '', $db['password'] ?? '',
[PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC]
);
echo "=== pages with slug like /products% (incl. deleted/hidden) ===\n";
foreach ($pdo->query("SELECT uid, pid, title, slug, doktype, layout, hidden, deleted, sorting FROM pages WHERE slug LIKE '/products%' ORDER BY uid") as $r) {
printf(" #%-4d pid=%-4d dok=%d lay=%-2d hid=%d del=%d sort=%-5d %-42s %s\n",
$r['uid'], $r['pid'], $r['doktype'], $r['layout'], $r['hidden'], $r['deleted'], $r['sorting'], $r['slug'], $r['title']);
}
echo "\n=== page 448 ===\n";
print_r($pdo->query('SELECT uid, pid, title, slug, doktype, layout, hidden, deleted, content_from_pid FROM pages WHERE uid = 448')->fetch());
echo "\n=== visible tt_content on pid 448 (top level) ===\n";
foreach ($pdo->query('SELECT colPos, CType, COUNT(*) c FROM tt_content WHERE pid = 448 AND deleted = 0 AND hidden = 0 AND tx_container_parent = 0 GROUP BY colPos, CType ORDER BY colPos') as $r) {
printf(" colPos %-4s %-24s n=%d\n", $r['colPos'], $r['CType'], $r['c']);
}