Page 1 of 1
Preview doesn't work anymore
Posted: Thu Aug 25, 2005 7:08 pm
by sandberg
I have a strange problem. When I edit a page and then press the Preview-button, the page starts to load and I see the frame where the page use to show up, but then the whole page turns white and I get a PHP-error:
Code: Select all
Warning: fopen(): Unable to access /export/vol2/unix/c/cs/www.csandberg.se/projekt/uk/tmp/cache/cmspreviewRQ5FHE in /export/vol2/unix/c/cs/www.csandberg.se/projekt/uk/lib/preview.functions.php on line 67
I get some more warnings but all because cmspreviewRQ5FHE doesn't exist. It worked yesterday, but not anymore. I haven't changed the code. Why is this happening?
/ Christian Sandberg
PS. The cache dir is writable.
Re: Preview doesn't work anymore
Posted: Mon Aug 29, 2005 11:39 am
by TNTH
I've had this problem too, I think I solved it by changing the attributes on the cache map. Right now the attributes are: rw-r-r.
Hope it works for you!
Re: Preview doesn't work anymore
Posted: Wed Dec 21, 2005 10:38 pm
by sloop
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 />