- 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>
47 lines
1.9 KiB
PHP
47 lines
1.9 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
/**
|
|
* Diagnose: where does the /products page (#447) content actually live?
|
|
* The portfolio dry-run found ZERO visible elements on pid 447 although the
|
|
* JSON payload renders ~40. Suspicion: content_from_pid or elements on
|
|
* another pid (10331/10368 = payload samples).
|
|
*
|
|
* READ-ONLY, plain PDO (pattern migrations/check_bg.php).
|
|
* Usage: php migrations/check_products_page.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 "=== page 447 ===\n";
|
|
$p = $pdo->query('SELECT uid, title, slug, doktype, layout, content_from_pid, l10n_parent, sys_language_uid FROM pages WHERE uid = 447')->fetch();
|
|
print_r($p);
|
|
|
|
echo "\n=== tt_content on pid 447 (any state) ===\n";
|
|
foreach ($pdo->query('SELECT colPos, CType, COUNT(*) c, SUM(hidden) hid, SUM(deleted) del FROM tt_content WHERE pid = 447 GROUP BY colPos, CType ORDER BY colPos') as $r) {
|
|
printf(" colPos %-4s %-24s n=%-3d hidden=%d deleted=%d\n", $r['colPos'], $r['CType'], $r['c'], $r['hid'], $r['del']);
|
|
}
|
|
|
|
echo "\n=== sample payload elements ===\n";
|
|
foreach ([10331, 10368, 10306] as $uid) {
|
|
$r = $pdo->query("SELECT uid, pid, CType, colPos, tx_container_parent, hidden, deleted, sys_language_uid FROM tt_content WHERE uid = $uid")->fetch();
|
|
print_r($r);
|
|
}
|