• Resolved infprt

    (@infprt)


    Hi,

    I’m getting a PHP warning:
    PHP Warning: file_get_contents(&ver=2.2.1): failed to open stream: No such file or directory in /home/***/public_html/wp-content/plugins/fix-event-calendar-caching/FECC_Cache_File.php on line 57

    I thought it could be something I’ve done messing with removing version from styles and js but I think I ruled that out so I’m kind of lost, can you please help? Thanks!!

    (the code I was messing with, just in case, goes in functions.php)

    // Remove WP Version From Styles
    add_filter( 'style_loader_src', 'sdt_remove_ver_css_js', 9999 );
    // Remove WP Version From Scripts
    add_filter( 'script_loader_src', 'sdt_remove_ver_css_js', 9999 );
    
    // Function to remove version numbers
    function sdt_remove_ver_css_js( $src ) {
    	if ( strpos( $src, 'ver=' ) )
    		$src = remove_query_arg( 'ver', $src );
    	return $src;
    }

    https://wordpress.org/plugins/fix-event-calendar-caching/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter infprt

    (@infprt)

    Well, since the warning refers to “Generate the cached javascript from the original javascript”, I assumed I only need this if the original javascript changes, so I modified the plugin to avoid checking if there’s a file cached or/and cache new one.

    It’s working now, no more PHP warning filling the log every page view! But I just hammered it down, I’m not very good at programming so as soon as an update is made this will break.

    Thread Starter infprt

    (@infprt)

    It’s resolved, after uninstalling and installing a few times it’s working now, out of the box and no more php warnings.

    Don’t know what was up :/ maybe the problem was removing the version numbers from css after the plugin install, installing the plugin after version numbers have been removed maybe stopped files from not being found.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘PHP Warning: file_get_contents(&ver=2.2.1): failed to open stream: No such’ is closed to new replies.