chore: add temporary menu debug diagnostics
Show current lg_idx and resolved menu type values on admin menu page when debug=1 to diagnose empty menu rendering. Made-with: Cursor
This commit is contained in:
@@ -4,6 +4,8 @@ $list = $list ?? [];
|
||||
$mtIdx = (int) ($mtIdx ?? 0);
|
||||
$mtCode = (string) ($mtCode ?? '');
|
||||
$levelNames = $levelNames ?? [];
|
||||
$debugMode = (bool) ($debug_mode ?? false);
|
||||
$debugInfo = is_array($debug_info ?? null) ? $debug_info : [];
|
||||
helper('admin');
|
||||
$adminMenusNavPath = current_nav_request_path();
|
||||
|
||||
@@ -44,6 +46,17 @@ $adminMenuListResolveHref = static function (string $rawLink) use ($adminMenusNa
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<?php if ($debugMode): ?>
|
||||
<section class="mt-2 border border-amber-300 bg-amber-50 text-amber-900 rounded p-2 text-xs">
|
||||
<strong>[DEBUG]</strong>
|
||||
lg_idx=<?= esc((string) ($debugInfo['lg_idx'] ?? '')) ?>,
|
||||
requested_mt_idx=<?= esc((string) ($debugInfo['requested_mt_idx'] ?? '')) ?>,
|
||||
resolved_mt_idx=<?= esc((string) ($debugInfo['resolved_mt_idx'] ?? '')) ?>,
|
||||
resolved_mt_code=<?= esc((string) ($debugInfo['resolved_mt_code'] ?? '')) ?>,
|
||||
list_count=<?= esc((string) ($debugInfo['list_count'] ?? '')) ?>
|
||||
</section>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="flex gap-4 mt-2 flex-wrap">
|
||||
<div class="border border-gray-300 bg-white rounded p-4 flex-1 min-w-0" style="min-width: 320px;">
|
||||
<h3 class="text-sm font-bold text-gray-700 mb-2">메뉴 목록</h3>
|
||||
|
||||
Reference in New Issue
Block a user