Temporary solving Slider Revolution 7.x fatal error: add_ajax_footer_functionality

I’ve been noticed this Slider Revolution issue in my sites

Fatal error in Slider Revolution 7.x: "class RevSliderAdmin does not have a method add_ajax_footer_functionality"

If you’re seeing this error (in your PHP error log or Query Monitor):

Uncaught Error: call_user_func_array(): Argument #1 ($callback) must be a valid callback, class RevSliderAdmin does not have a method “add_ajax_footer_functionality” in …/class-wp-hook.php

This is a known bug in the Slider Revolution plugin itself, present at least from version 7.1.4 through 7.1.8 (confirmed on multiple separate sites, across different theme versions). It’s not an issue with your setup, theme, or configuration.

Cause: in wp-content/plugins/revslider/admin/revslider-admin.class.php there’s an add_action('admin_footer', ['RevSliderAdmin', 'add_ajax_footer_functionality']) call that hooks a method which no longer exists in the class since the v7 rewrite. The block registering it only runs when the plugin license isn’t validated.

Temporary fix: find that line in the file (line number varies by version, search for it by text) and comment it out:

php

// add_action('admin_footer', ['RevSliderAdmin', 'add_ajax_footer_functionality']);

It gets overwritten on every plugin update, so you’ll need to reapply it after updating. Validating the license may also prevent it from triggering, since the code only runs when unvalidated.

Hello @Juanjo,

Thank you for bringing this to our attention and for providing such detailed information. We appreciate you sharing your findings and the temporary workaround. We’ll review this with our team and also coordinate with the Slider Revolution team regarding the issue.

Thanks for understanding

1 Like

Seems to be solved in Revslider 7.2.1

Glad to hear that the latest version (7.2.1) of Slider Revolution fixed the issue.

Unfortunately the issue appears again in WP 7.1.3

I’ve been hitting this error on every site I manage with Pro + the bundled Slider Revolution 7.x:

Uncaught Error: call_user_func_array(): Argument #1 ($callback) must be a valid callback, class RevSliderAdmin does not have a method "add_ajax_footer_functionality"

It appears on wp-admin/plugins.php . It seemed fixed in SR 7.2.1, then came back on all my sites at once right after a WordPress update. After digging into the code, I think I understand why it “comes and goes”.

What’s happening

In wp-content/plugins/revslider/admin/revslider-admin.class.php there’s this block:

php

if($f->_truefalse($f->get_options(['system', 'valid'], 'false')) === false
   && version_compare($f->get_options(['system', 'version'], RS_REVISION), $plugin['Version'], '>')){
    add_action('after_plugin_row_' . $plugin_id, ['RevSliderAdmin', 'show_purchase_notice'], 10, 3);
    add_action('admin_footer', ['RevSliderAdmin', 'add_ajax_footer_functionality']);
}

It runs when the plugin has no license validated with ThemePunch (which is the case for the Pro bundle) and a newer version is available than the one installed. It hooks a method that no longer exists in SR 7, which causes the fatal error.

So the bug doesn’t depend on your site or on WordPress. It seems to appear whenever ThemePunch releases a new version, on every bundled install at the same time. Updating SR to the latest version makes it disappear until the next release. The WordPress update likely just triggered a fresh update check, which is why it looked related. Licensed users never hit this code path, which may explain why it hasn’t been fixed upstream.

Permanent workaround

Commenting out the add_action('admin_footer', ...) line works, but it gets overwritten on every plugin update. A more durable option is a must-use plugin. Create wp-content/mu-plugins/fix-revslider-footer.php :

php

<?php
/**
 * Plugin Name: Fix RevSlider admin_footer hook
 * Description: Removes the orphaned add_ajax_footer_functionality hook from Slider Revolution 7.x
 */
add_action('admin_footer', function () {
    if (!is_callable(['RevSliderAdmin', 'add_ajax_footer_functionality'])) {
        remove_action('admin_footer', ['RevSliderAdmin', 'add_ajax_footer_functionality']);
    }
}, 1);

It survives plugin updates, and it does nothing if ThemePunch restores the method or removes the hook in a future version.

It would be great if Themeco could pass this on to ThemePunch, since the fix on their side is just removing that one add_action line.

Hope this helps someone!

Hello @Juanjo,

Thank you for this incredible breakdown and for taking the time to share your findings; it will help others. We will share this with our development team as well.

Thanks