From 9f0ae9fcb69783b86f296902f581132351e94954 Mon Sep 17 00:00:00 2001 From: FrankZamora Date: Mon, 1 Dec 2025 16:32:43 -0600 Subject: [PATCH] debug: add detailed logging to CustomCSSInjector MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Temporary logging to diagnose why CSS is not injecting in production 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .../Infrastructure/Services/CustomCSSInjector.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Public/CustomCSSManager/Infrastructure/Services/CustomCSSInjector.php b/Public/CustomCSSManager/Infrastructure/Services/CustomCSSInjector.php index 288935df..5ceb8fe5 100644 --- a/Public/CustomCSSManager/Infrastructure/Services/CustomCSSInjector.php +++ b/Public/CustomCSSManager/Infrastructure/Services/CustomCSSInjector.php @@ -35,14 +35,21 @@ final class CustomCSSInjector */ public function injectCriticalCSS(): void { + error_log('ROI CustomCSS: injectCriticalCSS CALLED'); + $pageType = $this->getCurrentPageType(); + error_log('ROI CustomCSS: pageType=' . $pageType); + $snippets = $this->getCriticalUseCase->execute($pageType); + error_log('ROI CustomCSS: critical snippets count=' . count($snippets)); if (empty($snippets)) { + error_log('ROI CustomCSS: NO critical snippets, returning'); return; } $css = $this->combineSnippets($snippets); + error_log('ROI CustomCSS: critical CSS length=' . strlen($css)); if (!empty($css)) { printf( @@ -57,14 +64,21 @@ final class CustomCSSInjector */ public function injectDeferredCSS(): void { + error_log('ROI CustomCSS: injectDeferredCSS CALLED'); + $pageType = $this->getCurrentPageType(); + error_log('ROI CustomCSS: deferred pageType=' . $pageType); + $snippets = $this->getDeferredUseCase->execute($pageType); + error_log('ROI CustomCSS: deferred snippets count=' . count($snippets)); if (empty($snippets)) { + error_log('ROI CustomCSS: NO deferred snippets, returning'); return; } $css = $this->combineSnippets($snippets); + error_log('ROI CustomCSS: deferred CSS length=' . strlen($css)); if (!empty($css)) { printf(