Codeinwp / Codeinwp/otter-blocks
AMP initialization fatals when Slider_Block cannot be autoloaded
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 198
- Forks
- 36
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 30
Description
Summary
Otter Blocks can terminate a frontend request during AMP block initialization when the Slider renderer class is unavailable to the autoloader.
Expected behavior: AMP initialization tolerates an unavailable optional renderer and the request continues.
Actual behavior: initialization throws Error: Class ".../Slider_Block" not found.
Impact: affected frontend requests return a fatal error instead of rendering the page.
Customer context
- Product / area: Otter Blocks AMP block initialization
- Version: 3.2.2 and 3.2.3
- Environment: WordPress 7.0.4; PHP 8.1.34 and 8.5.9
- Integration / third party: Not provided
- Reported error / symptom:
Error: Class ".../Slider_Block" not foundduring a frontend request - Impact: 2 telemetry occurrences across 2 distinct production sites between 2026-08-18 and 2026-08-20.
Reproduction notes
- Use Otter Blocks 3.2.2 or 3.2.3.
- Arrange for the plugin's Composer autoloader not to resolve
ThemeIsle\GutenbergBlocks\Render\AMP\Slider_Blockwhile the plugin source remains installed. - Load a frontend request so WordPress fires
init.
Observed in production: the request fails from Registration::init_amp_blocks() with the reported missing-class error. The specific autoload-map condition was not included in telemetry.
Diagnosis
Conclusion
Production telemetry identifies an uncaught exception at Registration::init_amp_blocks() while creating Slider_Block. This is confirmed by both affected tags: the method lists the Slider AMP renderer and instantiates each listed name directly, with no loadability check. If Composer's classmap cannot resolve that class, the direct instantiation produces the reported fatal.
Where this likely occurs
inc/class-registration.php—Registration::init()lines 103–107 registersinit_amp_blocks()on WordPressinit, so this runs during normal frontend bootstrap.inc/class-registration.php—Registration::init_amp_blocks()lines 997–1010 includesThemeIsle\GutenbergBlocks\Render\AMP\Slider_Blockand directly evaluatesnew $classnameat line 1005.inc/render/amp/class-slider-block.php—ThemeIsle\GutenbergBlocks\Render\AMP\Slider_Blocklines 8–15 defines the class expected by the registration path.composer.json—autoloadlines 61–65 exposesinc/through Composer's generated classmap; the runtime failure indicates the deployed autoloader did not resolve the class despite the source file being present.- Tags
v3.2.2andv3.2.3contain the same unguarded AMP initialization sequence. A related later autoload-resilience commit,2036d0c2, guarded the separateMain::autoload_classes()list but does not coverRegistration::init_amp_blocks().
Engineering notes
The telemetry location is product code, not the Themeisle SDK, so the issue belongs in Codeinwp/otter-blocks. The class source exists in the repository; the failure is specifically the registration path's assumption that the class can be loaded. The exact condition making the class unavailable on the affected installations is not captured by telemetry. The unguarded path runs regardless of whether an AMP request or a Slider block is present, because it is registered on init.
Test coverage status
tests/test-registration.php contains tests for dynamic renderer registration and unavailable dynamic renderer classes, including classmap-like missing-file scenarios at lines 172–245. No relevant coverage was found during inspection for Registration::init_amp_blocks() or an unavailable AMP renderer. tests/test-main-autoload.php covers the separate Main::autoload_classes() list, not this AMP list.
What to verify or explore next
- Reproduce with an Otter installation whose Composer autoload map lacks the Slider renderer entry, then trigger a frontend request.
- Run the PHP unit suite containing
tests/test-registration.phpafter exercising the AMP initialization path. - Check whether deployed artifacts for the affected releases can contain a stale or incomplete Composer classmap after update or cache conditions.
Unknowns / follow-up
- Telemetry does not include the deployed classmap or the preceding update state, so the source of the missing autoload entry remains unverified.
- It is unknown whether the Circle Counter or Lottie AMP renderer classes can encounter the same unavailable-class condition.
Confidence
Confidence: 97/100
Production telemetry records the same uncaught frontend exception on two sites running Otter Blocks 3.2.2–3.2.3, and both affected release tags instantiate the AMP Slider class without verifying that it is loadable.
Crash telemetry
| Occurrences | 2 |
| Distinct sites | 2 |
| First seen | 2026-08-18 00:45 UTC |
| Last seen | 2026-08-20 19:46 UTC |
| Crash location | product:inc/class-registration.php:1005 |
| Request context | frontend |
| Inside Themeisle SDK | no |
| Product versions | 3.2.2, 3.2.3 |
| WP versions | 7.0.4 |
| PHP versions | 8.1.34, 8.5.9 |
| SDK versions | 3.3.58, 3.3.59 |
Source: automated crash report — otter-blocks, fingerprint 55f383e45f58cecbd63a002e8ec6c72a
Generated by bug-report-triage (ID: bug-report-triage_6a8a8c91024290.22743109)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in inc/class-registration.php at Registration::init_amp_blocks() and compare the AMP renderer definition in inc/render/amp/class-slider-block.php. Add coverage in tests/test-registration.php for an unavailable AMP renderer, then run the relevant PHP unit tests and verify frontend initialization continues without the missing-class fatal.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, wordpress
- Domain
- backend, testing-qa
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 84/100