• Resolved Erich Munz

    (@erich_k4wp)


    we see a lot php errors in our error.log like “Plugin settings are not yet saved for the site, please save settings!” although the settings are saved. i think these errors are generated by “frontend visitors” (scanning for installed plugins etc.)

    so why not simple check for is_admin() in
    wp-ffpc-class.php ~ line 224

    if ( is_admin() )
    		{
    			$settings_link = ' ? <a href="' . $this->settings_link . '">' . __( 'WP-FFPC Settings', $this->plugin_constant ) . '</a>';
    			/* check for errors */
    
    			if ( ! WP_CACHE )
    				$this->errors['no_wp_cache'] = __("WP_CACHE is disabled, plugin will not work that way. Please add <code>define ( 'WP_CACHE', true );</code> to wp-config.php", $this->plugin_constant ) . $settings_link;
    
    			if ( ! $this->global_saved )
    				$this->errors['no_global_saved'] = __("Plugin settings are not yet saved for the site, please save settings!", $this->plugin_constant) . $settings_link;
    
    			if ( ! file_exists ( $this->acache ) )
    				$this->errors['no_acache_saved'] = __("Advanced cache file is yet to be generated, please save settings!", $this->plugin_constant). $settings_link;
    
    			if ( file_exists ( $this->acache ) && ! is_writable ( $this->acache ) )
    				$this->errors['no_acache_write'] = __("Advanced cache file is not writeable!<br />Please change the permissions on the file: ", $this->plugin_constant) . $this->acache;
    
    			foreach ( $this->valid_cache_type as $backend => $status ) {
    				if ( $this->options['cache_type'] == $backend && ! $status ) {
    					$this->errors['no_backend'] = sprintf ( __('%s cache backend activated but no PHP %s extension was found.<br />Please either use different backend or activate the module!', $this->plugin_constant), $backend, $backend );
    				}
    			}
    
    			/* get the current runtime configuration for memcache in PHP because Memcache in binary mode is really problematic */
    			if ( extension_loaded ( 'memcache' )  ) {
    				$memcache_settings = ini_get_all( 'memcache' );
    				if ( !empty ( $memcache_settings ) && $this->options['cache_type'] == 'memcache' )
    				{
    					$memcache_protocol = strtolower($memcache_settings['memcache.protocol']['local_value']);
    					if ( $memcache_protocol == 'binary' ) {
    						$this->errors['memcached_binary'] = __('WARNING: Memcache extension is configured to use binary mode. This is very buggy and the plugin will most probably not work correctly. <br />Please consider to change either to ASCII mode or to Memcached extension.', $this->plugin_constant );
    					}
    				}
    			}
    
    			foreach ( $this->errors as $e => $msg ) {
    				$this->utils->alert ( $msg, LOG_WARNING, $this->network );
    			}
    		}

    https://www.ads-software.com/plugins/wp-ffpc/

Viewing 1 replies (of 1 total)
  • Plugin Author petermolnar

    (@cadeyrn)

    Hi,

    I never thought about this but the truth is, I’m glad I’m not checking that. Most of those errors would affect the site and the frontend therefore adding them only to the admin would not be helpful enough.

Viewing 1 replies (of 1 total)
  • The topic ‘Error Reporting Suggestion’ is closed to new replies.