Fatal Error with 8.3.0
-
After updating to the latest version of Nelio A/B Testing, the site immediately threw a fatal error on every page load, rendering the site inaccessible. I was able to reproduce this consistently on a staging environment running WordPress on WP Engine.
Error:
PHP Fatal error: Uncaught Error: Call to a member function get_running_experiments() on null in …/nelio-ab-testing/includes/utils/functions/helpers.php:84Stack trace summary:
nab_get_running_experiments()is called fromload.php:76- Which is triggered by
get_all_tested_pattern_ids()atload.php:33 - Which is hooked into the
wpaction viaenable_relevant_tests_on_legacy_themes()
Root cause (as diagnosed):
The plugin’s main instance (nab()) is returning null whenget_running_experiments()is called during thewpaction. This indicates the core plugin singleton is not yet initialized at the point the synced pattern experiment hook fires. This appears to be a bootstrapping/initialization order regression introduced in this update —nab()is being called before the plugin instance has been registered.Environment:
- WordPress on WP Engine (managed hosting)
- Object cache cleared — did not resolve the issue
- No other plugin conflicts identified
Resolution:
Rolled back to the previous version, which resolved the fatal immediately.Please review the initialization timing of the core plugin singleton relative to the
wpaction hook in the synced pattern experiment loader. A null guard onnab()inhelpers.php:84may serve as a short-term patch, but the underlying load order issue should be addressed.
You must be logged in to reply to this topic.