I think the content.functions.php script is assuming that the template will always be in the cache - it fopens it for reading without testing to see whether it exists or not. Talking about-
function preview_get_template ($tpl_name, &$tpl_source, &$smarty_obj)
near line 233 in content.functions.php. In preview mode, I get the errors:
Code: Select all
<b>Warning</b>: fopen(/data/www/cms/cmsmadesimple/tmp/cache/cmspreviewYXjA81): failed to open stream: No such file or directory in <b>/data/www/cms/cmsmadesimple/lib/content.functions.php</b> on line <b>247</b><br />
<br />
<b>Warning</b>: filesize(): Stat failed for /data/www/cms/cmsmadesimple/tmp/cache/cmspreviewYXjA81 (errno=2 - No such file or directory) in <b>/data/www/cms/cmsmadesimple/lib/content.functions.php</b> on line <b>248</b><br />
<br />
<b>Warning</b>: fread(): supplied argument is not a valid stream resource in <b>/data/www/cms/cmsmadesimple/lib/content.functions.php</b> on line <b>248</b><br />
<br />
<b>Warning</b>: fclose(): supplied argument is not a valid stream resource in <b>/data/www/cms/cmsmadesimple/lib/content.functions.php</b> on line <b>249</b><br />
<br />
<b>Warning</b>: unlink(/data/www/cms/cmsmadesimple/tmp/cache/cmspreviewYXjA81): No such file or directory in <b>/data/www/cms/cmsmadesimple/lib/content.functions.php</b> on line <b>250</b><br />