Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #1495984

    Hello,

    When updating plugins while using Enfold together with WP Super Cache, a fatal error occurs on all my sites!

    Enfold triggers avia_force_clear_caches() during the update process, which calls wp_cache_clear_cache(). This leads to a call to get_blog_option() in wp-super-cache/wp-cache-phase2.php, but the function is not available at that point, causing a fatal error.

    Error:
    Uncaught Error: Call to undefined function get_blog_option()

    It seems cache clearing is triggered too early during the plugin upgrade process.

    Best regards, Pete

    #1495995

    Hey Peter,

    Please try adding this to your child theme functions.php file:

    function avf_before_force_clear_caches_callback() {
        return false;
    }
    add_filter( 'avf_before_force_clear_caches', 'avf_before_force_clear_caches_callback');

    Best regards,
    Rikard

    #1496053

    Hi Rikard,

    Thanks a lot, that fixed the problem – is this something you’ll add in a future update?

    Best regards, Pete

    #1496060

    Hi,

    I can’t promise anything right now, but it will likely be included in the next release of the theme.

    Best regards,
    Rikard

    #1496062

    Hi,

    Thanks, Should I remove the code when that happens – or does it not matter that it is there twice?

    Best regards, Pete

    #1496069

    Hi,

    If the fix is included in the version that you are installing, then you can remove the code I posted earlier.

    Best regards,
    Rikard

    #1496486

    Hi everyone,

    I’d like to kindly follow up and ask if there’s any indication whether a fix for this is planned in an upcoming update?

    We’re currently updating about 250 sites and would prefer to avoid a temporary functions.php fix. :-)

    Thanks for a quick update

    #1496522

    Hi,

    The fix was included in the latest version of the theme, 7.1.4. Please make sure to upgrade the theme if you haven’t done so. Let us know if the issue persists.

    https://kriesi.at/documentation/enfold/changelog/

    Best regards,
    Ismael

    #1496551

    Hi ismael,

    I had already updated all my pages to version 7.1.4 when I created this thread and there was the error on all pages… would you like to check again.

    BR, Pete

    #1496617

    Hi,

    Thank you for the update.

    What happens if you modify the enfold/includes/config-enfold/functions-framework.php and replace line 213

    if( function_exists( 'wp_cache_clear_cache' ) )
    		{
    			wp_cache_clear_cache( 'all', false );
    		}
    

    .. with the following code?

    		if( function_exists( 'wp_cache_clear_cache' ) && function_exists( 'get_blog_option' ) )
    		{
    			wp_cache_clear_cache( 'all', false );
    		}
    

    Best regards,
    Ismael

    #1496761

    Hi,

    Unfortunately, I don’t have the opportunity to test this, but it is a problem on all pages if the code Rikard has posted is not inserted.

    BR, Pete

    #1496791

    Hi,

    Are you saying that it works fine when the avf_before_force_clear_caches filter is added? Please keep the avf_before_force_clear_caches filter in the functions.php file to prevent the function from executing unintentionally.

    Best regards,
    Ismael

    #1496801

    Hi Ismael,
    Thank you very much, yes that’s exactly what I’m saying ;)
    Can I just continue to use the filter, or will/can it cause problems with future updates?
    BR, Pete

    #1496821

    Hi,

    You can just continue using the filter to prevent force clearing of cache. This should not cause problems with future updates. This can be done manually in the plugin options or in their own settings.

    Best regards,
    Ismael

Viewing 14 posts - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.