cchandler.ashx generanting css with errors

This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.

Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.

This is the place to report bugs and get support

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum.
This thread is closed to new posts. You must sign in to post in the forums.
2/24/2013 6:43:10 PM
Gravatar
Total Posts 6

cchandler.ashx generanting css with errors

Hi,

I had started a thread in another category (https://www.mojoportal.com/Forums/Thread.aspx?pageid=5&t=11423~1) about an issue on my website (www.sambobrasil.com.br) when someone access it with Google Chrome. But now, I'm thinking it's a bug. I noted that when I disable the cache in the control panel of mojoportal and I refresh the page, everything in the site is rendered (css, html) as expected. As soon as I enable the cache again, the layout crashes.  It happens on every machine... even one that is accessing the site by its very first time. So I got the result of csshandler.ashx? ... with cache enabled and cache disabled.

When the cache is enabled, I got one big string line of code. When I put this in my css validator, it showed me a lot of errors of "Expected a media query or opening brace ('{')". It seems that something is broken.

When the cahe is disabled, I got a well formated css... with no errors when I put this in the css validator. 

So... would exist some bug in the parse of site's css when cache is enabled? Please... help me.

Thanks.

 

 

2/25/2013 8:47:19 AM
Gravatar
Total Posts 18439

Re: cchandler.ashx generanting css with errors

parsing of the css happens regardless of cache, ie it must parse it before it can cache it on the server so I don't understand how cache could be the problem.

The only issue I know of with csshandler is that is you use background images with url() the image file name must have single quotes ie url('myimage.png') not url("myimage.png") and not url(myimage.png)

otherwise it cannot resolve the base path for the image correctly.

When I view your site in Chrome it looks fine to me at the moment.

2/25/2013 10:30:55 PM
Gravatar
Total Posts 6

Re: cchandler.ashx generanting css with errors

Hi Joe, thanks for your attention.

Sorry about "parse"... actually I meant minify... not parse.

Anyway... I found a lot of entries like that in the template css (foundation221):

@media handheld, only screen and (max-width: 767px) { .reveal-modal-bg { position: absolute; } ...

I think the problem is, when I disable the cache, CSS is not minified ... Chrome receives the css just like above and works properly. When I enable cache, css is minified and returned like "@media handheld,only screen and(max-width: 767px) {..." (note that a character space between the "and" and the parenthesis was removed). Chrome is not working with this. IE9 and Firefox are working good... but not Chrome. When I paste the minified css in the css parser, It complains about that removed space: 
"Expected a media query or opening brace ('{')". I just put the space again... and there is no more error. 

Does something  make sense for you? or Am I completely crazy??? 

Thanks for your help.

2/28/2013 12:09:49 PM
Gravatar
Total Posts 18439

Re: cchandler.ashx generanting css with errors

Hi,

It could be a problem in the minifying, that is a separate issue from cache. You can disable it by adding this in user.config:

<add key="MinifyCSS" value="false"/>​

Can you zip up your skin and send it to me so I can try to replicate the problem, maybe I can fix it? joe dot audette at g mail dotcom

​Thanks,

Joe

3/6/2013 2:49:09 PM
Gravatar
Total Posts 18439

Re: cchandler.ashx generanting css with errors

Hi,

Thanks for sending me your example skin so I could reproduce the problem.

This is now fixed in the source code repository so it will be fixed in the next release.

Best,

Joe

3/6/2013 5:10:46 PM
Gravatar
Total Posts 6

Re: cchandler.ashx generanting css with errors

Thank you Joe. 

Best regards,

You must sign in to post in the forums. This thread is closed to new posts.