19 August 2011 at 7:04am
I have a site that's set up and hosted live and uses caching to quite an extent to speed it up. Now, I have a little (big really) problem that has cropped up. It seems that, whenever a change is made in the CMS and it is published, all the pages have their JS and CSS (anything assigned via Requirements) prepended with the wrong domain name. I have to manually clear out the cache directories to get the site working again. The odd thing is, this domain name is only present as a redirector URL, not in the settings. Silverstripe just seems to get completely screwed up, which stops the site from styling or functioning correctly.
Now, I've heard that others have had this same problem, but I can't find a solution to it. Does anyone here know?
20 August 2011 at 1:34am
Maybe some more info might help:
As for caching: are you refering to SilverStripe static or the partial caching? Or some thirdparty cache? As for clearing out the cache directory: are you referring to a static cache directory, the entire silverstripe-cache directory or...?
As for the redirector URL: where/how is that included? In code? Anywhere else?
Could you give an example of how you assign your requirements (path-like)?
20 August 2011 at 1:52am
By cache I mean static cache. When I empty the cache, I empty the static cache directory. The redirection I'm using is a standard redirector page. It's the only location the domain is used, yet, when silverstripe publishes, all externally linked files magically get prepended with that domain, instead of the proper site domain. There's no other reference to the domain, so it's a mystery why SS gets messed up.
20 August 2011 at 6:29am
the one place I know of, where hardcoded domain info is stored is in the silverstripe-cache directory. Sometimes when a site is moved to a production server, this directory is copied along. Doing a ?flush=all or just emptying it would solve that. Hope that's it...