Link to home
Start Free TrialLog in
Avatar of Dean OBrien
Dean OBrienFlag for United Kingdom of Great Britain and Northern Ireland

asked on

magento pointing to incorrect CSS files in MEDIA folder

Experts,

I recently migrated from servers and also went from Magento 1.5 to 1.6.

I followed all the steps in a migration guide and the site seems to be pulling the correct data from the database, however no style are brought in.

When i look at the source it appears to be pointing to incorrect css files: (they dont exist)
http://www.astridandmiyu.com/media/css/926b867aad08366e23045ec6791d5a54.css

I suspect this has something to do with the encryption key in app/etc/local.xml ?? but im pretty sure that the key is identical to the one from the previous server.

The URL doesnt currently resolve, therefore to view the problem you would need to add this line to your HOST file:
149.255.56.74 www.astridandmiyu.com

Any suggestions would be greatly appreciated
Easynow
Avatar of Chris Stanyon
Chris Stanyon
Flag of United Kingdom of Great Britain and Northern Ireland image

Hi Easynow,

It's not to do with the encryption key, but a setting that combines all your CSS files into 1 in order to add performance to the site. In the backend, go to System -> Configuration -> Developer and you'll see a section for CSS, and an option to combine them into one.

Untick that, save it, and reload your site (you may need to clear down your cache (System -> Cache Management).

Look at the source of your site once reloaded and you should see the individual stylesheets again.

If you want to recombine then, follow the above steps but tick the box and save. This will then generate the correct CSS file for you and put it in the media folder.

Avatar of Dean OBrien

ASKER

hey chris

I had come across a blog post which pretty mush said the same thing.

I accessed configuration -> developer via back end and i thought i changed the settings to no avail. But further to your post i have went back and they were still set to YES. The problem is there is also no style on the back end. I click "save config", but nothing appears to happen....

See attahed screen grab.

Any suggestions? can this setting be changed via the database?

Regards
Easynow User generated image
Hey,

That is a bit of a problem. When you combine the stylesheets, it also combines the admin ones. Basically it takes all your css stylesheets from your CSS folder within your theme and then creates and uses the weird named ones that you'll see in your source code. It puts them in the public_html/media/css folder.

I don't know where in the database these settings are stored.

Your best bet, if you still have access to the old server configuration is to grab the various css files contained in public_html/media/css and copy them to your new server (same location)

You may also need to do this with Javascript if you combined your JS files (which would explain why your submit button isn't working - it's coded to submit the form by Javascript!

Let me know if you still have problems and I'll see what else I can do.

Found the setting in the database

The setting is in this table:

core_config_data

Look for a row that has a 'path' value of 'dev/css/merge_css_files' and change the setting to 0

You might want to run the usual precaution of backing up your database  :)

Clear down caches and reload your site


Hiya, I changed the settings -and that brought back the CSS and JavaScript files for default... But for so
E reason the theme ones are not loading.... Strange. I have changed the settings in conf -> designs but still not loading. Any ideas? Anyway u answered the first question thanks ;) will award the points in the morning. Easynpw
ASKER CERTIFIED SOLUTION
Avatar of Chris Stanyon
Chris Stanyon
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks again!

Another question coming if you got time :)