Unable to copy xxxxxxx.tpl to template cache directory error

iamtimbo
@iamtimbo
10 years ago
301 posts
Suddenly have this error - in previous half hour I had edited a custom template, but even pages without that template either don't load or show a similar error.

Can access site via FTP, but not load any admin pages to reset caches/ do an integrity check....

Can't see how I've created such an error editing an obscure custom template - is this a hosting problem?.
updated by @iamtimbo: 09/20/15 04:58:21PM
iamtimbo
@iamtimbo
10 years ago
301 posts
This appears to have entirely resolved itself with no intervention by myself. I'll leave this up here for reference - I did have to do a full integrity check after it resolved itself, as the CSS was all over the place, and site search was not functioning.
michael
@michael
10 years ago
7,768 posts
That's a very common error during development.

The usual cause of it is requesting a template file that doesn't exist.

Any of these would set it off:
{jrCore_include template="a-file-that-doesnt-exist.tpl"}
{jrCore_list module="jrAudio" template="a-file-that-doesnt-exist.tpl"}

or in the jrCore_parse_template() function.

It usually happens to me when I get one of the parameters wrong
jrCore_parse_template('some-template.tpl', $_rep, 'jrVideo')
when I'm actually working in the jrAudio module. the 'some-template.tpl' gets looked for in the jrVideo's /templates directory, its not found, so you see that error.

The solution is to either upload the file so it can be found or point the call to the correct location where the file actually is.
iamtimbo
@iamtimbo
10 years ago
301 posts
Hi, Michael,

Thanks for that - always good to know how these things occur - had a panic on for a minute! I assume using the slowest hosting in the universe didn't make for a speedy resolution, either!

Tim
michael
@michael
10 years ago
7,768 posts
Slow hosting sucks.

I use a local machine for my dev stuff, then upload it to production when its finished.

Nothing worse than being in a good productive flow and have your zone broken out of because you have to wait for something beyond your control. Hate that.