Skip to content

Admin initialization crashes when Neve Config lacks MODS_TPOGRAPHY_FONT_PAIRS #509

Description

@pirate-bot

Summary

Templates Patterns Collection can crash while initializing its admin functionality on a Neve installation whose settings configuration does not provide the expected typography font-pairs constant.

Expected behavior: Admin initialization continues and the starter-sites functionality remains available with compatible font-pair data or its fallback.

Actual behavior: An AJAX request terminates with Error: Undefined class constant 'MODS_TPOGRAPHY_FONT_PAIRS'.

Impact: The affected administrator request fails before the plugin finishes registering its admin functionality.

Customer context

  • Product / area: Starter Sites & Templates by Neve, admin initialization and onboarding typography data
  • Version: 1.4.3
  • Environment: WordPress 7.0.2, PHP 7.4.33.14
  • Integration / third party: Neve theme settings classes were loaded; reported Neve version is unknown
  • Reported error / symptom: Error: Undefined class constant 'MODS_TPOGRAPHY_FONT_PAIRS' during an AJAX request
  • Impact: 6 telemetry occurrences across 1 site between 2026-08-05 07:59 and 08:01 UTC

Reproduction notes

  1. Use Templates Patterns Collection 1.4.3 in an administrator request where Neve\Core\Settings\Mods is loaded but Neve\Core\Settings\Config lacks MODS_TPOGRAPHY_FONT_PAIRS.
  2. Trigger plugin initialization through an admin AJAX request.
  3. Observed in production telemetry: initialization reaches the font-pair lookup and throws Error: Undefined class constant 'MODS_TPOGRAPHY_FONT_PAIRS'.

The precise Neve version and AJAX action are not available in the crash report.

Diagnosis

Conclusion

Production telemetry directly identifies an uncaught undefined-class-constant error at the font-pair lookup in Admin::get_font_parings(). The 1.4.3 release invokes this lookup during Admin::init() and only verifies that Neve\Core\Settings\Mods exists before using Neve\Core\Settings\Config::MODS_TPOGRAPHY_FONT_PAIRS. The reported runtime proves that the loaded Neve configuration class did not expose that constant, so the class-existence guard is insufficient for this compatibility path.

Where this likely occurs

  • includes/Admin.phpAdmin::init() lines 66-97 registers admin hooks and unconditionally calls get_font_parings() at line 96.
  • includes/Admin.phpAdmin::get_font_parings() lines 995-1136 uses fallback pairs, then at lines 1110-1115 checks only Mods before reading Config::MODS_TPOGRAPHY_FONT_PAIRS; telemetry resolves the crash to line 1113.
  • includes/Main.phpMain::setup_admin() lines 197-200 creates Admin and calls Admin::init() after Main::should_load() permits an administrator request.
  • includes/Admin.phpAdmin::get_font_parings() line 1113 is present in tag v1.4.3, matching the telemetry's affected product version.
  • neve/inc/core/settings/config.phpConfig defines the referenced constant at line 100 in the inspected current Neve source, confirming the product is coupling this path to a Neve settings API; the affected Neve version was not supplied.

Engineering notes

The failure occurs before the method can retain its built-in fallback font-pair array. It is limited by the inspected guard to environments where the Neve Mods class is already loaded but the paired Config API differs. The trace shows this is reached from plugin boot during an administrator AJAX request, rather than from the bundled Themeisle SDK. The exact Neve release producing the missing constant is unknown from telemetry, so the compatibility range is an inference rather than a version-confirmed boundary.

Test coverage status

No PHPUnit test focused on Admin::get_font_parings() or its Neve compatibility branches was found during inspection. tests/php/static-analysis/neve.php lines 3-11 supplies a Config stub that includes MODS_TPOGRAPHY_FONT_PAIRS, so static analysis does not cover the missing-constant case. The e2e mock configuration contains font-pair fixture data in e2e-tests/config/mocks.js, but no relevant compatibility test was found during inspection.

What to verify or explore next

  • May be worth reproducing admin initialization with a Neve settings class that provides Mods but not Config::MODS_TPOGRAPHY_FONT_PAIRS.
  • Check the Neve version installed on an affected telemetry site, if that metadata becomes available, to establish the compatibility boundary.
  • Run the relevant PHP and onboarding e2e suites after adding coverage for the incompatible Neve API shape.

Unknowns / follow-up

  • The crash report does not include the Neve theme version or the AJAX action that initiated bootstrap.
  • It is unknown whether another plugin or a partial/older Neve deployment supplied the differing settings classes.

Confidence

Confidence: 98/100

Production telemetry records six uncaught exceptions in Templates Patterns Collection 1.4.3, and the reported line is present in that release's admin initialization path with an insufficient Neve compatibility guard.

Crash telemetry

Occurrences 6
Distinct sites 1
First seen 2026-08-05 07:59 UTC
Last seen 2026-08-05 08:01 UTC
Crash location product:includes/Admin.php:1113
Request context ajax
Inside Themeisle SDK no
Product versions 1.4.3
WP versions 7.0.2
PHP versions 7.4.33.14
SDK versions 3.3.58

Source: automated crash report — templates-patterns-collection, fingerprint ec37ca98f527a9cafe0b885e9a4973ec
Generated by bug-report-triage (ID: bug-report-triage_6a7422fe76e194.70453882)

Metadata

Metadata

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions