Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » rc3 and rc4 cache big problem (trying to edit the main template can make you crazy :) )

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Page: 1
Go to End
Author Topic: 1615 Views
  • nexialis
    Avatar
    Community Member
    5 Posts

    rc3 and rc4 cache big problem (trying to edit the main template can make you crazy :) ) Link to this post

    Recent RC releases (3 & 4) have a strange cache system.
    I did not manage to make SStripe use a cache folder in its own folder and not on /tmp system main folder.

    I read many posts on this forum about strange problems with editing the tagline, header, template... I understand now : When SStripe creates its /tmp/silverstripe-cache-something cache folder, there is now easy way after that to make a change in the template.

    Details :

    To reproduce the problem, make a simple "blackcandy" default rc3/rc4 install. (There is perhaps a problem with the automatic delete install files, I got blank pages sometimes but this is not the main issue). Then the usual next step is to try to edit somepage with the admin panel, it is ok. Then many people like me will try to edit the template just for a simple test like changing the header : "Your Site Name" and "your site's tagline here".

    I tried like others here to edit "the header" in the page.ss in the blackcandy original folder... but even afer a forced browser refresh, I did not see any change in the published website.

    Some people wrote something abotu searching in the "mysite" SStripe subfolder but mysite subfolder only contains two empty subfolders (at least in the rc3 and rc4 I tried).

    I was going mad when I found the /tmp/something SStripe cache folder... Then the only way I found to make a change in the header and everywhere in the main template is to :

    - Edit /path_to_your_Stripe_webfolder/themes/blackcandy/templates/Page.ss
    - Delete files in /tmp/silverstripe-cache-something

    I guess this is not the right way but I was not able to find anything else.

  • rbarreiros
    Avatar
    Community Member
    21 Posts

    Re: rc3 and rc4 cache big problem (trying to edit the main template can make you crazy :) ) Link to this post

    Hello nexialis,

    You tried to refresh the pages appending flush=1 at the end of url ?

    example: http://localhost/about-us?flush=1

    Doing that it will regenerate the cache for that specific request.

    Best regards,

  • nexialis
    Avatar
    Community Member
    5 Posts

    Re: rc3 and rc4 cache big problem (trying to edit the main template can make you crazy :) ) Link to this post

    x (test)

    Sometimes I got this issue when replying on this forum :
    Fatal error: Call to a member function setField() on a non-object in /sites/ssopen/www/forum/code/Forum.php on line 641

  • nexialis
    Avatar
    Community Member
    5 Posts

    Re: rc3 and rc4 cache big problem (trying to edit the main template can make you crazy :) ) Link to this post

    The "?flush=1" trick is working but how did you find this ?
    Is it the official way ?
    What's the use of the "mysite/templates" empty folders ?

    By the way, too bad there is no way to edit the template in
    the standard admin panel like some other content.

  • nexialis
    Avatar
    Community Member
    5 Posts

    Re: rc3 and rc4 cache big problem (trying to edit the main template can make you crazy :) ) Link to this post

    Creating a silverstripe-cache subfolder in the main Sstripe folder is working
    and there is no more /tmp/silverstripe-cache-something folder. I think this
    subfolder should be already created in the default install SStripe package with
    acces rights verification like some other folders.

    [ EDITED : and a .htaccess to forbid direct web acess of files in that folder ]

    By the way, it did not solve or make easier the "difficult to guess" template
    "edit and flush with url" system.

  • musaulker
    Avatar
    9 Posts
    1615 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.