WordPress.org

Ready to get started?Download WordPress

Forums

W3 Total Cache
Plugin could not be activated because it triggered a fatal error. (8 posts)

  1. androidgalaxy
    Member
    Posted 1 year ago #

    I am getting this error after installing w3 total cache on http://bookzoul.com/

    below is the error code

    Fatal error: Call to undefined function w3tc_button_link() in /home/vishal/public_html/bookzoul.com/wp-content/plugins/w3-total-cache/lib/W3/GenericAdminEnvironment.php on line 99

    http://wordpress.org/plugins/w3-total-cache/

  2. KURK DESIGN
    Member
    Posted 1 year ago #

    Just got the same error.

    Reinstalling doesn't work.

    http://www.kurk-design.nl

  3. almooj-craig
    Member
    Posted 1 year ago #

    First thing you should do is take a look at the code where the error comes from.

    $exs->push(new FilesystemOperationException(
    	sprintf(__('The Page Cache add-in file advanced-cache.php is not a W3 Total Cache drop-in.
    	It should be removed. %s', 'w3-total-cache'),
    	w3tc_button_link(__('Yes, remove it for me', 'w3-total-cache'), wp_nonce_url($remove_url,'w3tc')))));
    return;

    It appears that you have some file in your cache that W3TC does not like and it want's to ask you if you want it removed, so it's trying to load the w3tc_button_link but it can't find that function.

    You could try two thing. Completely clear all of your cache (even ones that were created by other plugins) so that there are no files that w3tc does not like. Then try to reinstall, most likely that will work.

    Or you could require the file where the button function is located. Place the require code just before the button function is called. Most likely that will work, but perhaps there are other functions that are also missing. It would look like this:

    require_once(W3TC_DIR.'/inc/functions/other.php');
    $exs->push(new FilesystemOperationException(
    	sprintf(__('The Page Cache add-in file advanced-cache.php is not a W3 Total Cache drop-in.
    	It should be removed. %s', 'w3-total-cache'),
    	w3tc_button_link(__('Yes, remove it for me', 'w3-total-cache'), wp_nonce_url($remove_url,'w3tc')))));
    return;

    Craig

  4. gregbarr23
    Member
    Posted 1 year ago #

    I'm trying to switch from WP Super Cache to W3 Total Cache and having this same problem. I deleted the old cache before disabling SuperCache, but that's not helping.

    I don't understand the second solution recommended and always hesitate to monkey with code in and around plugins like that so will stick with WP SuperCache for this site, I guess.

  5. gregbarr23
    Member
    Posted 1 year ago #

    Never mind, I took it one step further and deleted WP SuperCache altogether. As part of that process I had to manually remove this from wp-config.php.

    define('WP_CACHE', true); //Added by WP-Cache Manager
    define( 'WPCACHEHOME', '/mnt/stor10-wc1-ord1/815556/www.solacesystems.com/web/content/wp-content/plugins/wp-super-cache/' ); //Added by WP-Cache Manager

    That let me delete WP SuperCache, after which the install of W3 TotalCache worked fine.

  6. riomurphy
    Member
    Posted 1 year ago #

    Greg - I'm playing with both plugins and got the same error. On top of deleting the cache through the WP SuperCache plugin then deactivate, you then need to go to wp-content via FTP and delete the cache folder and two cache files: wp-cache-config.php and advanced-cache.php. The W3 Total Cache plugin then can be activated.

  7. gregbarr23
    Member
    Posted 1 year ago #

    I think those files might be deleted as part of the "clean up process" you actually uninstall (not just deactivate) WP Super Cache, because I didn't have to do that.

  8. riomurphy
    Member
    Posted 1 year ago #

    Most likely but I didn't want to delete WP Super Cache so this works as well (I backed them up so I could pop them back in if I wanted to which I did :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.