Frontend CSS generation fatals when `CSS_Utility` is unavailable
I maintainer di solito rispondono entro 1 giorno
@girishpanchal30 ci sta già lavorando.
Dal 29/9/2026.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 66/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Ambito
- frontend, testing-qa
Direzione di ricerca
Inizia da inc/css/blocks/class-core-image-plugin-css.php e Core_Image_Plugin_CSS::render_css(), quindi esamina inc/css/class-css-utility.php e la configurazione dell’autoload di Composer in composer.json. Riproduci il percorso CSS del widget frontend con un blocco core/image quando CSS_Utility non è disponibile e controlla tests/test-css.php e tests/test-main-autoload.php per individuare i pattern esistenti. Il lavoro è completato quando la richiesta interessata non genera più un fatal e la coverage verifica il caso della dipendenza non disponibile.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
Frontend requests can terminate with a fatal error while Otter generates CSS for a Core Image block.
Expected behavior: if a CSS-generation dependency cannot be loaded, the request remains available and the affected generated styles can be omitted.
Actual behavior: the request throws Class "...CSS_Utility" not found during Core Image CSS rendering.
Impact: affected frontend pages can fail to render while widget CSS is generated.
Customer context
- Product / area: Otter Blocks frontend widget CSS generation
- Version: 3.2.3
- Environment: WordPress 7.0.4 and 7.1; PHP 8.2.33 and 8.5.6
- Integration / third party: Themeisle SDK 3.3.59 reported; crash location is not inside SDK code
- Reported error / symptom:
Class "...CSS_Utility" not found - Impact: 2 telemetry occurrences across 2 production sites between 2026-08-21 06:25 and 09:26 UTC.
Reproduction notes
- Use Otter Blocks 3.2.3 with widget CSS generation reached from a frontend request.
- Include a
core/imageblock in the parsed widget content. - Make
ThemeIsle\GutenbergBlocks\CSS\CSS_Utilityunavailable to the active Composer autoloader while the handler source remains present. - Observed in production:
Core_Image_Plugin_CSS::render_css()throwsClass "...CSS_Utility" not found.
Exact condition that caused the unavailable classmap on the two reported sites is not available.
Diagnosis
Conclusion
Production telemetry identifies Core_Image_Plugin_CSS::render_css() as the throwing location in the 3.2.3 release. The class being constructed is present in the release source, but is only discoverable through Composer's generated classmap. The inspected call path instantiates it without a loadability check, so an unavailable mapping becomes an uncaught frontend exception. This is separate from the existing guard for top-level entries in Main::autoload_classes(), which does not cover this nested dependency.
Where this likely occurs
inc/css/blocks/class-core-image-plugin-css.php—Core_Image_Plugin_CSS::render_css()lines 41-42 imports and directly constructsCSS_Utility; this matches the telemetry location.inc/css/class-css-utility.php—CSS_Utilityline 62 defines the missing class, confirming the release source contains it.composer.json—autoload.classmaplines 61-65 maps the entireinc/directory through Composer rather than explicitly loading this class.inc/class-base-css.php—Base_CSS::cycle_through_static_blocks()lines 338-359 invokes the matching CSS handler; the telemetry stack reaches this path through widget CSS generation.- Tag
v3.2.3(0c6ff15e, 2026-08-20) contains byte-identical versions of bothclass-core-image-plugin-css.phpandclass-css-utility.phpto the inspected source. Later commit3ad45e18adds aclass_exists()guard only around top-level classes inMain::autoload_classes().
Engineering notes
The error occurs after Core_Image_Plugin_CSS itself has been loaded, during construction of its utility dependency. The available evidence is consistent with a stale, incomplete, or otherwise mismatched Composer classmap; telemetry alone does not establish which condition made that map unavailable on the affected sites. The product bootstrap loads vendor/autoload.php when readable in otter-blocks.php lines 35-42. The report is limited to the Core Image handler reached while saving widget styles on the frontend.
Test coverage status
tests/test-css.php lines 21-200 exercises CSS_Utility directly under a working test autoloader. tests/test-main-autoload.php lines 43-89 covers unavailable top-level entries and verifies top-level listed classes are loadable. No relevant coverage was found during inspection for an unavailable CSS_Utility during Core_Image_Plugin_CSS::render_css() or the widget CSS traversal path.
What to verify or explore next
- May be worth reproducing a frontend request containing a Core Image block in active widget content with the
CSS_Utilityclassmap entry unavailable. - If reproducible, run the widget CSS generation path on a package whose Composer classmap differs from its
inc/files. - Check whether other CSS handlers that directly construct
CSS_Utilityexhibit the same failure condition.
Unknowns / follow-up
- The telemetry does not include the affected package's generated classmap or update state.
- No release artifact was available locally to verify whether the shipped 3.2.3 classmap lacked the entry versus the affected installations becoming mismatched after deployment.
Confidence
Confidence: 91/100
Production telemetry captures a repeatable uncaught frontend exception at the v3.2.3 CSS_Utility construction site. The class exists in the release source but depends exclusively on the generated Composer classmap; this traversal path does not verify that dependency is loadable before instantiation.
Crash telemetry
| Occurrences | 2 |
| Distinct sites | 2 |
| First seen | 2026-08-21 06:25 UTC |
| Last seen | 2026-08-21 09:26 UTC |
| Crash location | product:inc/css/blocks/class-core-image-plugin-css.php:42 |
| Request context | frontend |
| Inside Themeisle SDK | no |
| Product versions | 3.2.3 |
| WP versions | 7.0.4, 7.1 |
| PHP versions | 8.2.33, 8.5.6 |
| SDK versions | 3.3.59 |
Source: automated crash report — otter-blocks, fingerprint fc34a6430cf025cd055962aad99a3af7
Generated by bug-report-triage (ID: bug-report-triage_6a893b0c2c6df7.50080523)
- Lingua principale
- PHP
- Stelle
- 200
- Fork
- 37
- Merge medio
- 2g 15h
- PR unite (30g)
- 32
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Codeinwp/otter-blocks
-
Countdown: Edit as HTML still breaks the block (leftover of #3072)Forse già presa @girishpanchal30 l’ha presa 2 giorni fa. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
Codeinwp/otter-blocks#3127 · 2 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
bug bug-report bug-report-triage crash-report
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
Codeinwp/otter-blocks#3027 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
Codeinwp/otter-blocks#2055 · 8 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
customer report new feature
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
Codeinwp/otter-blocks#1924 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 42/100
Codeinwp/otter-blocks#3129 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di Codeinwp/otter-blocks
Issue simili
-
[Sync EN] calendar: document the ValueErrors thrown for invalid calendar IDs and dates (#6005)Apertasync-en
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
iftechfoundation/ifdb#1415 ·
I maintainer di solito rispondono entro 1 giorno
-
Перевод устарел
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
glpi-project/glpi#26064 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
OpenGIS/waymark-wp#79 ·