• Resolved hannah3405

    (@hannah3405)


    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:84

    Stack trace summary:

    • nab_get_running_experiments() is called from load.php:76
    • Which is triggered by get_all_tested_pattern_ids() at load.php:33
    • Which is hooked into the wp action via enable_relevant_tests_on_legacy_themes()

    Root cause (as diagnosed):
    The plugin’s main instance (nab()) is returning null when get_running_experiments() is called during the wp action. 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 wp action hook in the synced pattern experiment loader. A null guard on nab() in helpers.php:84 may serve as a short-term patch, but the underlying load order issue should be addressed.

Viewing 1 replies (of 1 total)
  • Plugin Author David Aguilera

    (@davilera)

    Thanks for the detailed report, @hannah3405.

    I was unable to reproduce the issue locally but, thanks to your detailed explanation, I think I was able to address and fix it correctly. If you could please upgrade to version 8.3.1, validate it, and let me know how it goes, I’d really appreciate it.

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.