Skip to content

v2.4.1 — Fix fatal error on Roots/Acorn (Sage-based) themes

Choose a tag to compare

@mexiter mexiter released this 16 Sep 16:48
· 9 commits to main since this release
13e7215

Fixed

  • Fatal error rendering the toplist block/shortcode on Roots/Acorn (Sage-based) themes. The Alpine.js already-loaded detection called strpos() directly on every queued script's ->src, assuming it is always a plain string. Acorn-based themes register compiled assets with ->src as an asset value object instead, which threw a TypeError the theme's Blade layer turned into a fatal error on every page rendering the block or shortcode. AlpineJsEnqueuer now coerces via __toString() when available and skips the entry otherwise instead of fataling.

Found live on a client site during QA; reproduced in an isolated regression test (same TypeError, no live site needed) before fixing.

Tests

Two new cases pin both the non-Stringable-safe-skip and the Stringable-object-still-detected paths. Full suite: 968 tests green.