Skip to content

Scroll-to-top frontend crash when Scroll_To_Top options class is unavailable #4606

Description

@pirate-bot

Summary

The frontend can terminate with a Class "Neve…Scroll_To_Top" not found error while loading the scroll-to-top feature.

Expected behavior: a missing optional scroll-to-top dependency does not make the frontend request fail.

Actual behavior: the request reaches the scroll-to-top script enqueue callback and throws an uncaught class-not-found error.

Impact: affected frontend pages, including a reported 404 request, cannot complete rendering.

Customer context

  • Product / area: Neve scroll-to-top frontend view
  • Version: 4.2.11
  • Environment: WordPress 7.1; PHP 8.2.30
  • Integration / third party: Themeisle SDK 3.3.59 was present; telemetry identifies the crash as outside SDK code.
  • Reported error / symptom: Class "Neve…Scroll_To_Top" not found at inc/views/scroll_to_top.php:94 during wp_enqueue_scripts.
  • Impact: 2 occurrences across 1 site in the telemetry query window.

Reproduction notes

  1. Use Neve 4.2.11 with scroll-to-top enabled.
  2. Make Neve\Customizer\Options\Scroll_To_Top unavailable to the Neve autoloader while retaining the scroll-to-top view callback. This condition is inferred from the crash and source path; its site-specific cause is unknown.
  3. Load a frontend page so wp_enqueue_scripts runs.

Observed in production telemetry: an uncaught class-not-found error at Scroll_To_Top::enqueue_scripts() line 94. The representative trace came from a 404 template request.

Diagnosis

Conclusion

Production telemetry confirms an uncaught frontend exception at the tagged source line. In v4.2.11, Scroll_To_Top::enqueue_scripts() directly calls Scroll_To_Top_Options::is_enabled() without confirming that the options class resolved. The local autoloader can return failure for a missing or unreadable mapped class file, and the module factory then skips that module; the independently loaded view can still later invoke the unavailable class. This is a product resilience defect for that failed class-loading path.

Where this likely occurs

  • inc/views/scroll_to_top.phpNeve\Views\Scroll_To_Top::enqueue_scripts() lines 93-100; the telemetry location is line 94, where Neve\Customizer\Options\Scroll_To_Top::is_enabled() is invoked.
  • inc/core/core_loader.phpNeve\Core\Core_Loader::define_modules() lines 83-103; Views\Scroll_To_Top is registered as a core feature independently of the Customizer options module.
  • inc/customizer/loader.phpNeve\Customizer\Loader::define_modules() lines 75-95; Customizer\Options\Scroll_To_Top is registered separately.
  • inc/core/factory.phpNeve\Core\Factory::build() lines 70-78; a class that cannot be loaded returns null, so its module is skipped.
  • autoloader.phpNeve\Autoloader::require_file() lines 149-160; absent or unreadable mapped class files return false rather than throwing.
  • v4.2.11 contains both scroll-to-top classes and the failing line. No tag was found containing the later class-guard commit f71438636 (Added class existence checks to prevent errors), but that commit does not add a guard at the reported static call.

Engineering notes

  • The trace enters Neve\Views\Scroll_To_Top::enqueue_scripts() on wp_enqueue_scripts; it is not inside the bundled Themeisle SDK, matching the telemetry classification.
  • The exact unavailable fully qualified class name is abbreviated by telemetry. At the reported source line, the only class resolution is the Scroll_To_Top_Options alias for Neve\Customizer\Options\Scroll_To_Top.
  • A clean v4.2.11 source tree contains inc/customizer/options/scroll_to_top.php, so the evidence does not establish why the class was unavailable on the affected site. The observed code path nevertheless allows that unavailable dependency to escalate to a frontend fatal.

Test coverage status

  • tests/test-neve-autoloader.php covers missing mapped-file behavior in TestNeveAutoloader::testMissingMappedFileReturnsFalse() (lines 63-79).
  • No relevant coverage was found during inspection for loading the scroll-to-top view while Neve\Customizer\Options\Scroll_To_Top is unavailable, or for frontend wp_enqueue_scripts behavior in that state.

What to verify or explore next

  • Reproduce with the scroll-to-top view loadable and the mapped Customizer options class unavailable or unreadable, then run a frontend request with the feature enabled.
  • Check whether the reported failure occurs with a partial deployment, an interrupted update, or filesystem readability constraints.
  • Run the relevant PHPUnit suite, including tests/test-neve-autoloader.php, after adding a scenario covering the view callback path.

Unknowns / follow-up

  • Telemetry does not provide the full class name, installed file list, filesystem state, or theme modifications for the affected site.
  • No earlier working production version was supplied or verified, so the report is not classified as a regression.

Confidence

Confidence: 92/100

Production telemetry records two frontend fatal requests in Neve 4.2.11, and the tagged source shows an unguarded static reference to the missing Customizer options class from the reported line. The class-loading path can leave a missing mapped class unresolved while the scroll-to-top view remains active.

Crash telemetry

Occurrences 2
Distinct sites 1
First seen 2026-08-26 00:53 UTC
Last seen 2026-08-27 03:42 UTC
Crash location product:inc/views/scroll_to_top.php:94
Request context frontend
Inside Themeisle SDK no
Product versions 4.2.11
WP versions 7.1
PHP versions 8.2.30
SDK versions 3.3.59

Source: automated crash report — neve, fingerprint 7b00b8992907a50473277e7f456c38fa
Generated by bug-report-triage (ID: bug-report-triage_6a9275bea97755.79078212)

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions