• Resolved xnau webdesign

    (@xnau)


    I’m getting several errors on activation:

    Warning: include(…/wp-content/plugins/wp-typography/vendor/composer/../../includes/wp-typography/data-storage/class-abstract-cache.php): failed to open stream: No such file or directory in …/wp-content/plugins/wp-typography/vendor/composer/ClassLoader.php on line 444

    Warning: include(): Failed opening ‘…/wp-content/plugins/wp-typography/vendor/composer/../../includes/wp-typography/data-storage/class-abstract-cache.php’ for inclusion (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in …/wp-content/plugins/wp-typography/vendor/composer/ClassLoader.php on line 444

    Fatal error: Class ‘WP_Typography\Data_Storage\Abstract_Cache’ not found in …/wp-content/plugins/wp-typography/includes/wp-typography/data-storage/class-transients.php on line 36

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author pepe

    (@pputzer)

    @xnau: It looks like you need to clear your opcode cache (related to core ticket #36455). The easiest way is probably by restarting your PHP process (i.e. php-fpm).

    Thread Starter xnau webdesign

    (@xnau)

    Ah…right! Should have thought of that.

    Do you happen to know how I can set it up so the cache is cleared when a plugin auto-update occurs?

    Plugin Author pepe

    (@pputzer)

    I’m using this snippet in mu-plugins, taken from the discussion in the linked trac ticket:

    <?php
    
    /** 
     * Reset PHP opcache 
     * 
     * @since 4.8 
     * 
     * @return boolean 
     */ 
     function wp_opcache_reset($reply, $package, $wp_upgrader) { 
     	if ( function_exists( 'opcache_reset' ) && ini_get('opcache.validate_timestamps') != '1' && (!ini_get('opcache.restrict_api') || stripos(ABSPATH, ini_get('opcache.restrict_api')) === 0) ) { 
     		opcache_reset(); 
     		$opcache_status = opcache_get_status(); 
    
    		if ( null !== $opcache_status && isset( $opcache_status['scripts'] ) ) {
     			$matches = preg_grep( "/^" . preg_quote(ABSPATH, '/') . "/" , array_keys($opcache_status['scripts']) ); 
     			if ( count( $matches ) > 0 ) { 
     				array_map('opcache_invalidate', $matches, array_fill(0, count($matches), TRUE)); 
    			}
    		}
     	} 
     	return $reply; 
     } 
    
    add_filter( 'upgrader_pre_download', 'wp_opcache_reset', 10, 3 ); 
    
    Thread Starter xnau webdesign

    (@xnau)

    wow, thanks…it would have taken me hours to figure that out

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Fatal error on upgrade to 5.3.2’ is closed to new replies.