chore(php): add toc debug logging for guest visibility issue
Temporary debug logging to diagnose why TOC shows for logged users but not for guests. Logs visibility checks at each layer. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -36,9 +36,16 @@ final class EvaluateComponentVisibilityUseCase
|
||||
*/
|
||||
public function execute(string $componentName): bool
|
||||
{
|
||||
// DEBUG: Log for TOC only
|
||||
$debugToc = ($componentName === 'table-of-contents');
|
||||
|
||||
// Paso 1: Verificar visibilidad por tipo de pagina
|
||||
$visibleByPageType = $this->pageVisibilityUseCase->execute($componentName);
|
||||
|
||||
if ($debugToc) {
|
||||
error_log("EvaluateComponentVisibility [{$componentName}]: visibleByPageType=" . ($visibleByPageType ? "true" : "false"));
|
||||
}
|
||||
|
||||
if (!$visibleByPageType) {
|
||||
return false;
|
||||
}
|
||||
@@ -46,6 +53,10 @@ final class EvaluateComponentVisibilityUseCase
|
||||
// Paso 2: Verificar exclusiones
|
||||
$isExcluded = $this->exclusionsUseCase->execute($componentName);
|
||||
|
||||
if ($debugToc) {
|
||||
error_log("EvaluateComponentVisibility [{$componentName}]: isExcluded=" . ($isExcluded ? "true" : "false"));
|
||||
}
|
||||
|
||||
// Mostrar si NO esta excluido
|
||||
return !$isExcluded;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user