SilverCart Forum

We moderate this Forum and we're here to help. Have you already run a forum search to check if your problem has already been solved?

You can help us helping you by providing detailed error messages, screenshots and logfile entries.

SebastianRamon

Page: 1
Topic Going Live trouble 15069 Views

Going Live trouble

22 May 2013 at 10:51am

Hi all,
I have curious kind of problem.
On the test server everything was fine.
I've uploaded the site (http://www.krasivoto.bg - it's on bulgarian) and my custom styles disappeared. Not realy but css files does not loading at all.
When calling site with "?flush=all" the things happen. In "dev" mode too.
If I switch to Live mode and without "?flush=all" - styles gone.
I use Silvercart 1.3.7 and I followed second way for customising themes in your docs.
Any idea what I'm missing.

Regards
Borislav

Re: Going Live trouble

22 May 2013 at 3:26pm

Hello Borislav,

do you use the RequirementsEngine to load all of your CSS files?

If not you should do so to ensure that the loading order of the files is preserved.

In the source code of your site I can see that the files "css/screen/basemod.css" and "css/screen/content.css" are loaded after "assets/_combinedfiles/base.css". Is that correct?

Greetings,
Sascha

Re: Going Live trouble

23 May 2013 at 3:04pm

Hello Sascha,
and thank you for your help.
No, I don't use RequirementsEngine. Where should I insert these requirements?

Regards
Borislav

Re: Going Live trouble

29 May 2013 at 12:19pm

Hi Borislav,

you can register css files parsed by RequirementsEngine in your _config.php this way:

// Block a css file
RequirementsEngine::registerBlockedFile('path/to/css/blocked-file.css');
// Register a css file which will be auto-detected by theme
RequirementsEngine::registerThemedCssFile('my-content');
// Register a css file
RequirementsEngine::registerCssFile('path/to/css/my-file.css');
// Register a css file with priority
RequirementsEngine::registerCssFile('path/to/css/priority-file.css', 10);

The RequirementsEngine will parse all registered css files with SS template engine when calling ?flush=all and combines them into 3 files (or more).
If you set a priority to your registered files, the file with a high priority will be loaded after the ones with low priorities to be sure that the high priority files rules will overwrite low priority files rules.

Best Regards
Sebastian

Re: Going Live trouble

2 June 2013 at 10:46am

Hi Sebastian,
Thank you for the support!
I'll try this out.

Regards,
Borislav