• Great plugin BTW. Indispensable.

    However, after installing a plugin named Go Fetch Jobs (for WP Job Manager)
    the admin crashes with errors from ELM.

    I can run either plugin fine but not both at the same time.
    Here are the errors. I hope you can help.

    PHP Fatal error:  Uncaught RuntimeException: The action name "elm-start-auto-setup" is already in use. in ----wp-content/plugins/error-log-monitor/vendor/ajax-wrapper/AjaxWrapper.php:156
            Stack trace:
            Ajaw_v1_Action->register() ----wp-content/plugins/error-log-monitor/vendor/ajax-wrapper/AjaxWrapper.php:97
            Ajaw_v1_ActionBuilder->register() ----wp-content/plugins/error-log-monitor/Elm/SetupWizard.php:20
            Elm_SetupWizard->__construct(Object(Elm_Plugin)) ----wp-content/plugins/error-log-monitor/Elm/Plugin.php:465
            Elm_Plugin->initSetupWizard('') ----wp-includes/class-wp-hook.php:286
            WP_Hook->apply_filters(NULL, Array) ----wp-includes/class-wp-hook.php:310
            WP_Hook->do_action(Array) ----wp-includes/plugin.php:453
            do_a in ----wp-content/plugins/error-log-monitor/vendor/ajax-wrapper/AjaxWrapper.php on line 156 ----wp-settings.php:450
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Janis Elsts

    (@whiteshadow)

    Thank you for the report. After some research, it looks like the error is caused by a minor compatibility issue in Go Fetch Jobs. It could probably be fixed by modifying that plugin so that it runs its basic initialization code *before* the plugins_loaded action.

    Technical explanation:

    Both plugins use [scbFramework](https://github.com/scribu/wp-scb-framework/wiki). Both plugins also use the scb_init($callback) function to run an initialization callback after scbFramework has been loaded. As far as I can tell, the underlying framework code can handle this in two ways:

    a) When a plugin calls scb_init before the plugins_loaded action, the framework waits until plugins_loaded and then runs all registered callbacks.
    b) When a plugin calls scb_init after plugins_loaded, the framework runs all registered callbacks immediately.

    The root of the problem is that the framework doesn’t seem to keep track of which callbacks it has already executed. This means that if you have a plugin that calls scb_init before all plugins are loaded (e.g. Error Log Monitor) and another plugin that calls the same function in a plugins_loaded hook (e.g. Go Fetch Jobs), some of the callbacks will be run twice. In this case, some setup code in Error Log Monitor gets executed twice and throws a fatal error.

    I think this problem could be prevented by making sure that each plugin calls scb_init as early as practical instead of waiting for the plugins_loaded action.

    Thread Starter Blair

    (@cbcbcb)

    Thanks for your reply Janis.
    Is this an issue that will be resolved in a future release?
    I’d love to reactivate ELM.
    Thanks!

    Plugin Author Janis Elsts

    (@whiteshadow)

    I’ll add a workaround that will probably help. However, to fully fix the issue, Go Fetch Jobs would also need to be changed. Otherwise that plugin might still cause conflicts with other plugins.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘PHP Fatal error: Uncaught RuntimeException’ is closed to new replies.