21309 Posts in 5738 Topics by 2603 members
General questions about getting started with SilverStripe that don't fit in any of the categories above.
Page: 1 2
|Go to End||Next >|
3 June 2010 at 4:12am
I am using my own theme, with own Page sub-classes and modified Includes, such as Navigation.ss.
Changes made to .ss templates in the Includes folder are not reflected in the front end (after running GET /dev/build?flush=1 several times, cleaning / disabling browser cache, etc.). I don't use server-side caching, SilverStripe or another, either.
I am running SilverStripe 2.4.0 with MySQL on Ubuntu 8.4.0.
Any ideas ?
Many thanks in advance,
3 June 2010 at 5:07am
You could always try (*cringes*) deleting the "<% include include.ss %>" bit , viewing the page (item should not be there!), add back in the "<% include include.ss %>" back in... that will tell you 100% if what you are doing is working... but it ain't pretty!
3 June 2010 at 7:38am Last edited: 11 June 2010 10:38am
Thanks a lot for your suggestion.
I actually tried it before my original posting, but to no avail.
However, I seem to have found a workaround: when I upload the entire Templates folder (which contains the Includes folder, which in turn contains my changed Navigation.ss file) SilverStripe recognizes the change and takes it into account during the rebuild, and I do see the change in the front end. Note: this is not the case when I upload the Includes folder only - it has to be one level higher (the entire Templates folder)!
I did several tests and they seem to confirm this rule.
Now I investigated a little trying to understand the mechanism and here's the only conclusion I could find:
It seems SilverStripe is checking for changes to the files in the Templates folder (or specifically Page.ss if you use the standard theme - in this case Page.ss is the only file there)! If the content of the Templates folder appears unchanged (and that's the case, at least under Linux, when you update a file deeper in the folder's tree) then SilverStripe stops checking for changes, instead of doing a recursive lookup throughout the entire Templates tree...
Weird but that's the only explanation I can see.
25 January 2011 at 1:34am
I'm having the exact same issue here. Any changes I make to the includes/SideBar file are noting being reflected in the front end. Is there anyway to force silverstripe to recheck. (The above method by cadabramarketing isn't very convenient!) I've obviously done a rebuild also.
25 January 2011 at 1:46am
add a silverstripe-cache folder to your root (alongside cms and sapphire)
you can now delete it's contents (which is the cache) and force a complete rebuild
I am recommending this very often nested included templates...
3 February 2011 at 1:14am Last edited: 3 February 2011 1:15am
Hey Swabia, sorry to bring this up again but your comment above doesn't make sense to me. It sounds like you are saying create a cache folder then delete the cache on your browser then do a dev/build? This has no effect for me for updating the Include files. I encounter this issue time and time again and it is becoming very frustrating.
Clarification would be appreciated.
3 February 2011 at 1:24am
1)add a silverstripe-cache folder to your root (alongside cms and sapphire)
if on your server directory might be called something like...
if on a windows machine...
2)you can now delete it's contents (which is the cache) and force a complete rebuild
this means goto the folder you created before "silverstripe-cache" and delete the entire contents of the directory (i.e. the cache that silverstripe is creating server side) - nothing to do with browser cache!
(of course after creating the folder it will be empty - but when you browse a page silverstripe will use the folder to hold the cache - then when you change stuff you can delete and silverstripe will recreate)
3 February 2011 at 1:39am
Ahh. Thanks. I was just adding a folder called cache. Not silverstripe-cache. I'll give this a whirl! Cheers.
Page: 1 2
|Go to Top||Next >|