Skip to content

Autoloader fatals when a mapped submenu class file is unavailable #4563

Description

@pirate-bot

Summary

A frontend request can terminate with Failed opening required .../submenu.php while initializing the Neve Pro submenu feature.

Expected behavior: an unavailable mapped class file is handled as an unsuccessful autoload attempt rather than terminating the request.

Actual behavior: the request reaches a direct required-file operation and produces an uncaught fatal error.

Impact: affected sites can serve a fatal error on frontend requests that initialize navigation while the mapped file is unavailable.

Customer context

  • Product / area: Neve header/footer navigation with Neve Pro submenu styling
  • Version: Neve 4.2.10; Neve Pro Addon 3.2.9 observed in the inspected release checkout
  • Environment: WordPress 7.0.2; PHP 8.4.24
  • Integration / third party: Neve Pro Addon
  • Reported error / symptom: Failed opening required '.../submenu.php'
  • Impact: 5 telemetry occurrences across 4 sites during frontend requests between 2026-08-04 09:00 UTC and 20:52 UTC.

Reproduction notes

  1. Activate a Neve Pro configuration where submenu_style compatibility registers the submenu callback.
  2. Reach the navigation initialization path that constructs Neve_Pro\Modules\Header_Footer_Grid\Submenu\Submenu.
  3. Make the class's namespace-derived mapped PHP path unavailable in a controlled test environment.

Reported result: frontend telemetry records Failed opening required .../submenu.php from Neve\Autoloader::require_file().

Runtime reproduction was not performed; the failure path is confirmed by the production stack trace and the inspected Neve 4.2.10 source.

Diagnosis

Conclusion

The crash is confirmed as a Neve autoloader defect. The production trace reaches Neve\Autoloader::require_file() while resolving the Pro Submenu class, and Neve 4.2.10 invokes require for every mapped path without checking that the file is present. This turns an unavailable mapped file into the reported frontend fatal rather than allowing the autoload attempt to fail.

Where this likely occurs

  • autoloader.phpNeve\Autoloader::load_mapped_file() lines 114-137 constructs a namespace-derived PHP path and delegates it as though the mapped file exists.
  • autoloader.phpNeve\Autoloader::require_file() lines 147-150 directly executes require $file; the adjacent docblock states the method returns false when the file does not exist, but that branch is absent.
  • start.phpneve_run() lines 49-57 registers this autoloader for both Neve and Neve_Pro namespaces when NEVE_PRO_SPL_ROOT is defined.
  • includes/modules/header_footer_grid/module.phpNeve_Pro\Modules\Header_Footer_Grid\Module::run_module() lines 308-317 registers construction of Submenu after navigation initialization when submenu_style compatibility is available.
  • header-footer-grid/Core/Components/Nav.phpHFG\Core\Components\Nav::run_nav_init() lines 141-149 emits that action on the frontend initialization path reflected in telemetry.
  • 6567e40d2 (perf: PHP optimizations, 2019-08-07) removed the prior file_exists( $file ) conditional from Neve\Autoloader::require_file(). The release tag v4.2.10 contains the unguarded version.

Engineering notes

The inspected Neve Pro Addon v3.2.9 includes includes/modules/header_footer_grid/submenu/submenu.php and defines Neve_Pro\Modules\Header_Footer_Grid\Submenu\Submenu there. Therefore, the telemetry does not establish why that mapped path was unavailable on the affected installations; possible conditions include an incomplete or inconsistent deployed add-on file set. Independently, the confirmed Neve path makes that availability problem fatal in the reported request context.

The telemetry identifies the crash location as product code, not bundled Themeisle SDK code, so routing is to Codeinwp/neve.

Test coverage status

tests/test-neve-loaders.php contains TestNeveLoaders::testAutoloader() at lines 18-23, which verifies loading of existing Neve classes only. No relevant coverage was found during inspection for a missing mapped file or for the Neve Pro namespace mapping.

What to verify or explore next

  • May be worth reproducing a registered mapped namespace whose requested class path is absent and recording whether the autoload call returns without a fatal.
  • May be worth running the Neve loader test suite and adding the unavailable-file scenario to the verification scope.
  • May be worth checking affected installation file inventories and update logs to determine why the expected Pro submenu file was unavailable.

Unknowns / follow-up

  • Telemetry redacts the full required path, so the exact missing path segment cannot be compared with the inspected release file tree.
  • The report does not identify the affected sites' Neve Pro versions or installation/update state; the local Pro checkout is tagged v3.2.9 and is used only to validate the referenced class location.

Confidence

Confidence: 96/100

The production stack trace reaches Neve's autoloader while resolving the Pro submenu class. In Neve 4.2.10, the mapped path is passed directly to require without the documented existence check, and git history shows that guard was removed in commit 6567e40d2; this converts an unavailable mapped class file into a frontend fatal.

Crash telemetry

Occurrences 5
Distinct sites 4
First seen 2026-08-04 09:00 UTC
Last seen 2026-08-04 20:52 UTC
Crash location product:autoloader.php:148
Request context frontend
Inside Themeisle SDK no
Product versions 4.2.10
WP versions 7.0.2
PHP versions 8.4.24
SDK versions 3.3.59

Source: automated crash report — neve, fingerprint 300231a1be0b86f1a1b5e44fa59f7791
Generated by bug-report-triage (ID: bug-report-triage_6a72d181137a85.18652956)

Metadata

Metadata

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions