nalabr
Forum Replies Created
-
Forum: Plugins
In reply to: [Fast Velocity Minify] Failed to open stream: no such file or directoryHi Paul,
We don’t have the latest version but we have v2.3.2, which is almost the latest. Apparently there have been some significant changes since then. This is the code it’s referring to:
# register and enqueue minified file, consider excluding of mediatype “print” and inline css
if ($remove_print_mediatypes != 1 || ($remove_print_mediatypes == 1 && $header[$i][‘media’] != ‘print’)) {
if($force_inline_css != false) {
echo ‘<style type=”text/css” media=”‘.$header[$i][‘media’].'”>’.file_get_contents($file).'</style>’;
} else {# move CSS to footer with loadCSS ?
if($loadcss != false) {
if($fvm_remove_css != true) {# save to some sort of global and show it on the footer
$mt = $header[$i][‘media’];
echo ‘<link rel=”preload” href=”‘.$file_url.'” as=”style” media=”‘.$mt.'” onload=”this.onload=null;this.rel=\’stylesheet\'”>’;
echo ‘<noscript><link rel=”stylesheet” type=”text/css” media=”‘.$mt.'” href=”‘.$file_url.'”></noscript>’;
echo ‘<!–[if IE]><link rel=”stylesheet” type=”text/css” media=”‘.$mt.'” href=”‘.$file_url.'”><![endif]–>’;/*
# alternative way
echo <<<EOF
<script type=”text/javascript”>var ldfvm$i=document.createElement(“link”);ldfvm$i.rel=”stylesheet”,ldfvm$i.type=”text/css”,ldfvm$i.media=”bogus”,ldfvm$i.href=”$file_url”,ldfvm$i.onload=function(){ldfvm$i.media=”$mt”},document.getElementsByTagName(“head”)[0].appendChild(ldfvm$i);</script>
EOF;
*/}
Yes you are right – I realized afterwards that the CDN wouldn’t have anything to do with it since this is a backend error.
Yes, there are files going into fvm/out. And all around the plugin works – but when we noted the error in New Relic we were concerned because it might be an indication that at times, there are references to older files that have been deleted. And this did happen after clearing the FVM cache – but wondering why it didn’t detect that the file didn’t exist, and thus generate a new one?
And if this was the results of caching, why would there be a PHP error? Wouldn’t the client, in that case, be served a static version of that page, and thus no PHP errors should happen (as is the case with the CDN)?
Thanks,
Nathan