4

I've downloaded magento ver 1.9.2.0 (latest one) from the official website magentocommerce.com/download and installed it using the standard steps. But, now the css is broken and I'm getting a plain text file. Attaching the screenshot.

screenshot

I've tried the following solutions already:

  1. Cleared the cache in var/cache folder and removed all the files from var/session folder as well.
  2. changed the permissions of media and var folders to 777.
  3. Made sure that core_config_data table has proper values for the paths:-

    web/unsecure/base_url    mystore.com/
    web/secure/base_url      http://mystore.com/
    
  4. Tried installing different theme(bluescale) but couldn't do that because the UI of our website is broken and hence, few of the buttons are not working.

  5. Tried installing magento from windows/mac laptop.
  6. Installed flash on my chrome.

I checked few more similar answers but nothing worked out so far. Please see if someone can help.

  • Could you upload the screenshot again? Your question has good details, but it's hard to know what you are referring to without the image. – AreDubya Jul 30 '15 at 18:31
  • Sure. Added the screenshot again. – maxomax Jul 30 '15 at 19:56
  • Are you getting anything in the var/log folder? I'm assuming you have logging enabled - System -> Configuration -> Developer -> Log Settings – AreDubya Jul 30 '15 at 20:07
  • I checked, I dont have log enabled. But, with the current UI, I can't click on the "Save config" button. Clicking on this button does nothing. – maxomax Jul 30 '15 at 20:41
  • In the markup what is the path of the css that cant be loaded? – Andrew Kett Jul 30 '15 at 21:05
1

Reading your question there are 2 things that come to mind, one of which happened to me today. Magento uses a full path URL to call upon CSS and JS files and it is not uncommon that it results into problems when installing Magento or moving it to another server for example.

  • Could be that merge CSS files is turned on (guess it's unlikely since you installed a fresh copy and this setting is turned of by default). In case it is turned on, turn it off and empty your cache.
  • Magento is not able properly access your media folder. Make sure the media folder that you actually have a media folder and that it is writable by the server.

I've once also encountered problems with the Fooman Speedster extension that actually creates a new folder to put a merged CSS file into. Moving your site breaks just about all your CSS and JS. Make sure it is turned of though I guess you're not working with it. Might help someone else...

  • Thanks for the response. My css merging is off and the media folder is having 777 permission. Do we have to change the php.ini file? By default, the file name is php.ini.sample. – maxomax Jul 30 '15 at 21:32
  • Guess it won't have anything to do with your php.ini file. It's strange that no CSS rules are taking effect and it should definitely be a matter of its path to the sheets. What is the current path as opposed to the path it is seeking? Look at the source code... – Badger Aug 2 '15 at 8:37
  • sorry for my ignorance. I'm entirely new to web development and don't understand which path to look for and under which section of firebug (is it source, then under which folder and file). By sheets, do you mean css? – maxomax Aug 2 '15 at 11:48
  • Open firebug and look at the head section of your webpage. Look for a CSS reference (type="text/css") and check the path (that's after "href="). Maybe you can post this path here... – Badger Aug 4 '15 at 7:19
  • Thank you, I found them. Here is the complete tag- <link rel="stylesheet" type="text/css" href="mystore.com/skin/frontend/base/default/css/styles.css"; media="all"> <link rel="stylesheet" type="text/css" href="mystore.com/skin/frontend/base/default/css/widgets.css"; media="all"> <link rel="stylesheet" type="text/css" href="mystore.com/skin/frontend/base/default/css/print.css"; media="print"> . But, when I checked the css files(styles.css, print.css, widgets.css) in the source section, they all are empty. – maxomax Aug 4 '15 at 15:27
0

I know you have have changed permissions on media already but the thing that I see commonly cause this is when css merging is turned on but Magento cannot write the media/css directory to cache the merged css. Another sign of this if you look at the markup the css will have a strange path, if I remember correctly it is something like /path/to/magento/media/styles.css.

Maybe just to be 100% sure this isn't the problem, make sure the media/css directory exists, if it doesn't make it. Also change it to the same user that your server is running as and make it writable.

alternatively turn merging off by setting dev/css/merge_css_files in core_config_data to 0

  • Merging is turned off. When I checked via firebug, my skin/frontend/rwd/defalut/css/styles.css is empty. Moreover, the media/css directory doesn't exist on my server. Shall I manually create it. And, my core_config_data table doesn't have dev/css/merge_css_files as path. – maxomax Jul 30 '15 at 21:27
  • Is defalut a typo, that should be default. Also what happens when you go directly to the CSS file URL in your browser, is it a 404. Does that file exist on your server? – Andrew Kett Jul 30 '15 at 21:45
  • Sorry, that was a typo. Yes, the css in the URL is 404 page not found. And my styles.css is empty. media/css folder doesn't exist on the server. – maxomax Jul 30 '15 at 22:05
  • Media/CSS is only used when merging is on. It should be in skin/frontend/rwd/default/css/. – Andrew Kett Jul 30 '15 at 22:17
0

Try to reupload again all files: your-magento-store/skin/adminhtml/

  • Thanks for the suggestion. I did that, it's still the same. – maxomax Jul 31 '15 at 0:44
0

Check the Base Skin URL settings, in the admin, System -> Configuration -> General -> Web -> Unsecure|Secure -> Base Skin URL; they should be {{unsecure_base_url}}skin/ and {{secure_base_url}}skin/ on all scopes.

If that doesn't work, can you post here the requests that the browser makes to get the CSS files using the browser's developer tools? Or do a View Source on the site and post some of the <link rel="stylesheet" type="text/css" href="the interesting bit here" /> from head.

Cheers

  • Thanks a lot for the suggestion. Base Skin URLs are correct. Here is the tag <link rel="stylesheet" href="//fonts.googleapis.com/css?family=Raleway:300,400,500,700,600"> <link rel="stylesheet" type="text/css" href="example.com/skin/frontend/rwd/default/css/styles.css" media="all"> <link rel="stylesheet" type="text/css" href="example.com/skin/frontend/rwd/default/css/madisonisland.css" media="all">. But, I checked in the source tab-- both of the files madisonisland.css and styles.css are empty – maxomax Aug 2 '15 at 21:58
  • If you change back to the default theme, in the admin, System -> Configuration -> General -> Design -> Package -> Current Package Name = base, do the CSS files load? Can you also check the custom theme files, see if the CSS files are not empty? – Adi Aug 2 '15 at 22:07
  • Actually, the problem is that the UI buttons are not working. Whenever I try to change anything from the admin UI, and I press the button "Save config", it doesn't do anything. Is there a way to change this from the database tables? Moreover, I didn't add any theme from outside, I just used the package from magento website (magentocommerce.com/download). In default installation it shows the Current Package Name as rwd. – maxomax Aug 3 '15 at 16:37
  • Regarding using stuff from Magento Connect, here's an interesting argument: magento.stackexchange.com/a/40375/28733. Regarding your question, yes, you can change this from DB tables. First, can you show us the result of SELECT * FROM core_config_data WHERE path LIKE '%design%'; I suspect the theme you installed overwrote the admin theme instead of the frontend theme. – Adi Aug 3 '15 at 16:44
  • The query returned an empty result: MySQL returned an empty result set (i.e. zero rows). (Query took 0.0010 sec) SELECT * FROM core_config_data WHERE path LIKE '%design%' LIMIT 0 , 30 – maxomax Aug 3 '15 at 16:47
0

Have you tried copying again your default base LAYOUT and TEMPLATE to your new skin? If not, try to copy this two entire folder to your new skin. This works for me.

0

What does your System > Configuration > General > Design look like? What is your package? Does that package have a "Default" theme? Is there anything in the Theme drop down? If you've declared a package and no Default floder CSS is there it will do this. If you've declared a package and any theme without a default folder and no named theme it will do this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.