I have exactly the same problem. I upgraded minutes ago to v0.9.2.4 and I already have 3 error messages in my (always empty) error_log :
[28-Aug-2011 16:56:51] PHP Fatal error: Call to undefined function w3_url_format() in /home/USERNAME/public_html/wp-content/plugins/w3-total-cache/lib/W3/Plugin/PgCacheAdmin.php on line 213
[28-Aug-2011 17:18:39] PHP Fatal error: Call to undefined function w3_url_format() in /home/USERNAME/public_html/wp-content/plugins/w3-total-cache/lib/W3/Plugin/PgCacheAdmin.php on line 213
[28-Aug-2011 17:34:28] PHP Fatal error: Call to undefined function w3_url_format() in /home/USERNAME/public_html/wp-content/plugins/w3-total-cache/lib/W3/Plugin/PgCacheAdmin.php on line 213
I hope this gets corrected as soon as possible.
Well, I am not a PHP expert, but this should solve the problem. Open the problematic PgCacheAdmin.php, and after the line :
require_once W3TC_INC_DIR . '/functions/rule.php';
add :
require_once W3TC_INC_DIR . '/functions/url.php';
and cross your fingers 🙂
thank you tgeorge! seems to have solved it
My logs were swamped, thanks tgeorge for the solution 🙂
that did the trick. amazing how quickly that one error can turn into a 600 MB error log in 24 hours!
Thanks so much tgeorge!
Hmm I’m adding this to my post about W3T… it actually just gave me a weird issue today, which I resolved already. These support forums are really irreplaceable. Thanks for the info! 🙂
I just started getting these errors, too, starting a couple of days ago.
1.) How could this error just pop-up on it’s own out of nowhere, after having this version of W3TC installed and running fine for months?
2.) I worry about modifying the plugin files. Is this a known issue in W3TC? I wonder if the author agrees with this fix. (Frederick, are you out there?)
thanks,
Mike
This looks like a completely valid fix to me. 😉
This fix makes sense because the w3_url_format function is defined in the /functions/url.php file. The only thing i did slightly differently was to add the require_once right above the foreach array, but of course anywhere in the file is the same thing. Nice one tgeorge. 😉
/**
* Make HTTP requests and prime cache
*/
require_once W3TC_INC_DIR . '/functions/http.php';
require_once W3TC_INC_DIR . '/functions/url.php';
foreach ($queue as $url) {
$url = w3_url_format($url, array('w3tc_preload' => 1));
w3_http_get($url);
}
}
Stupid question but where is the “PgCacheAdmin.php”?
/plugins/w3-total-cache/lib/W3/Plugin/PgCacheAdmin.php
Issue is more than 9 months old and not fixed officially yet? I still get these errors. I hope the fix mentioned above is the right one
Doesnt look like this fix has been posted to the latest release. i just added it to my W3 plugin
Thanks for this – fixed my “missed schedule” problem.