Support » Plugin: Asset CleanUp: Page Speed Booster » Fatal Error upon activation

  • Resolved Kieran

    (@mywebink)


    Hi,

    Firstly, thank you for your work on this plugin. It’s really a great asset for the WordPress community and I look forward to a premium version.

    I attempted to install this plugin on a new site earlier today. When I do, I receive the below error

    Fatal error: Uncaught Error: Call to a member function removeEverywhereUnloads() on null in /home/Hosting/HostingID/public_html/wp-content/plugins/wp-asset-clean-up/classes/Settings.php:224 Stack trace:
    #0 /home/Hosting/HostingID/public_html/wp-content/plugins/wp-asset-clean-up/classes/Plugin.php(29): WpAssetCleanUp\Settings->update(Array)
    #1 /home/Hosting/HostingID/public_html/wp-includes/class-wp-hook.php(286): WpAssetCleanUp\Plugin->whenActivated('')
    #2 /home/Hosting/HostingID/public_html/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters('', Array)
    #3 /home/Hosting/HostingID/public_html/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
    #4 /home/Hosting/HostingID/public_html/wp-admin/plugins.php(174): do_action('activate_wp-ass...')
    #5 {main} thrown in /home/Hosting/HostingID/public_html/wp-content/plugins/wp-asset-clean-up/classes/Settings.php on line 224

    I’m running WordPress 4.9.6, PHP 7.2 and MySQL 5.7 on a CloudWays (Vultr) 2GB host. Have you seen this before, is there something I might be able to change in the code to get it to activate?

    Thanks,

    Kieran

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Gabe Livan

    (@gabelivan)

    Hello, Kieran!

    Thanks for the feedback and review. I’m surprised that you’re getting this error as no one reported it so far, can you deactivate the plugin (latest version) on another site and activate it again? Perhaps it’s an issue when it’s activated for the first time.

    I’m debugging it right now and I will come with a fix, definitely.

    PS: I’m already working on a premium version. I’m collecting feedback from other users, what kind of options would you like to see on the premium extension besides unloading assets on categories, archives, author pages etc.?

    Thanks,
    Gabe

    Plugin Author Gabe Livan

    (@gabelivan)

    @mywebink, try this:

    On the file /wp-content/plugins/wp-asset-clean-up/classes/Settings.php, go to line 184 (within update($settings) method), and update:

    global $wpacuUpdate;
    with
    $wpacuUpdate = new Update;

    Let me know if that fixes it!

    Thread Starter Kieran

    (@mywebink)

    Hi Gabe,

    Thanks for getting back to me so fast. I created a clean install of WordPress locally on a similar, but not identical, setup (PHP 7.2 / MariaDB 10) and experienced the same fatal error.

    I applied your patch locally and I was able to activate the plugin without error as well as the plugin functioning as expected. I then applied the same fix to the live setup and again it worked as expected.

    And to confirm, should the info be needed, I was able to deactivate and activate the plugin again without the error.

    I saw in your other posts that you were working on a premium version. Honestly there is nothing specific I am looking for I just wanted to support the future development of your plugin – of course, if there are premium bonuses to doing so I wouldn’t mind that either. I’ll have a think about anything that I might like to see that is within the scope of the plugin and get back to you with anything that I can think of.

    Thanks so much for the speedy replies and fix. It’s very much appreciated.

    All the best,

    Kieran

    Hello,

    I saw this post and am having a similar issue. When I try to activate the plugin I am getting the following message:

    Plugin could not be activated because it triggered a fatal error.

    Fatal error: Call to a member function removeEverywhereUnloads() on null in /home/content/a2pewpnaspod05_data01/65/41623965/html/wp-content/plugins/wp-asset-clean-up/classes/Settings.php on line 224

    Any help would be appreciated.

    Thanks so much!

    Sal

    Plugin Author Gabe Livan

    (@gabelivan)

    @sleitch, please follow the comment above (https://wordpress.org/support/topic/fatal-error-upon-activation-34/#post-10453582) where I provide a solution to fix it. I will release the fix officially as soon as possible.

    It worked! Thanks so much!

    Plugin Author Gabe Livan

    (@gabelivan)

    @sleitch, great news! What do you feel it’s missing in the current version of the plugin? I’m working on a premium extension and I’m collecting feedback from users.

    Plugin Author Gabe Livan

    (@gabelivan)

    The patch was officially applied, so you can activate the plugin in new WordPress installs and it won’t trigger the fatal error.

    • This reply was modified 2 years, 9 months ago by Gabe Livan.
Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Fatal Error upon activation’ is closed to new replies.