Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Silverstripe publishing issue


Go to End


6 Posts   1146 Views

Avatar
Lazarus404

Community Member, 72 Posts

19 August 2011 at 7:04am

Hey guys,

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?

Thanks loads,
Lee

Avatar
Lazarus404

Community Member, 72 Posts

19 August 2011 at 9:11pm

Anyone have any ideas? It's driving the client nuts and is making me look unprofessional :-(

Lee

Avatar
martimiz

Forum Moderator, 1391 Posts

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)?

Avatar
Lazarus404

Community Member, 72 Posts

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.

Lee

Avatar
martimiz

Forum Moderator, 1391 Posts

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...

Avatar
Lazarus404

Community Member, 72 Posts

20 August 2011 at 6:59am

Thanks, but I tried that, too. It's not that. I do know that, when I clear the cache, it functions correctly. However, between publishing and the cache being built, it goes awry.

Thanks again.

Lee