22975 Posts in 11620 Topics by 2826 members
|Go to End|
7 November 2013 at 3:16am
I'm having a bit of an issue with template files. To keep the code clean, and easy to maintain, I'm using the handy include function. However this seems to cause a bit of an issue.
The error I'm receiving is:
"[User Warning] None of these templates can be found in theme 'ppm': ContentBox.ss
Line 728 in /path-to-public_html/framework/view/SSViewer.php"
The file ContentBox.ss DOES exist.
I read in another post that a way to fix this is delete the whole of the SS cache, which seems to work, but is a pain doing it everytime I add a new include.
For reference, here's the stack trace:
None of these templates can be found in theme 'ppm': ContentBox.ss
I have no idea why it does this, but any help would be appreciated!
Thanks in advance!
7 November 2013 at 8:45am
Much like when adding a new class, you need to flush. You do this by appending ?flush=1 to the current URL.
7 November 2013 at 8:51am
I've done this many many times. Literally, the only way I've found to fix it is to delete the whole silverstripe cache folder.
I've tried flush=all, flush=1 and dev/build, just to try and get it working - but no joy.
Thank you for your reply though
7 November 2013 at 12:17pm Last edited: 7 November 2013 12:18pm
Can we see the template code please, or at least the few lines round the include that produces the error?
And can you check the .ss file permissions...
7 November 2013 at 10:52pm
The body of the template file is as follows:
<% include Header %>
<% if Colour != None %><div id="titleBlock" class="bkgrd$Colour">
</div><% end_if %>
<% include ContentBox %>
<% include Footer %>
I've also attached a screenshot showing the existing file.
However, it currently works. I've recently (this morning) deleted the ContentBox file, and the cache, and then reuploaded the ContentBox.ss file. Upon flushing, it works, so not sure what's going on here!
|Go to Top|