20

I was unable to install a module using Magento Connect, getting a Connection Error try again later error. Following the instructions of the module developer I attempted to fix permissions in the document root with:

find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;
chmod o+w var var/.htaccess app/etc
chmod 550 mage
chmod -R o+w media

It still didn't work so I ended up installing the module manually. I then logged into the admin backend and Magento was trying serve CSS files using the system file paths instead of URLs like so:

<link rel="stylesheet" type="text/css" href="/home/user/public_html/js/calendar/calendar-win2k-1.css" />
<link rel="stylesheet" type="text/css" href="/home/user/public_html/skin/adminhtml/default/default/reset.css" media="all" />
<link rel="stylesheet" type="text/css" href="/home/user/public_html/skin/adminhtml/default/default/boxes.css" media="all" />
<link rel="stylesheet" type="text/css" href="/home/user/public_html/skin/adminhtml/default/default/custom.css" media="all" />
<link rel="stylesheet" type="text/css" href="/home/user/public_html/skin/adminhtml/default/default/xmlconnect/boxes.css" media="all" />
<link rel="stylesheet" type="text/css" href="/home/user/public_html/skin/adminhtml/default/default/print.css" media="print" />
<link rel="stylesheet" type="text/css" href="/home/user/public_html/skin/adminhtml/default/default/menu.css" media="screen, projection" />

I immediately removed the extension and tried to match the perms from another server with a working Magento to no avail. I have also:

  • Cleared local, APC, and Magento caches
  • Looked in error logs (logging is enabled)
  • double-checked proper values of web/unsecure/base_url and web/secure/base_url in the DB
  • Rebooted, 3 times ;)

Minify is not being used. Merge CSS files are enabled, however I cannot figure out how to disable without the admin interface (save and navigation isn't working, even when I replace the correct values with Firebug). Any ideas would be greatly appreciated!

5 Answers 5

44

EDIT: As mentioned by @michael-hampton, this solution opens a serious security hole and shouldn't be used. Please don't use in production!

I ran into the same problem, and it happens that file permissions were not set properly. In order to allow Magento to generate assets files, media directory must be writable by apache user.

So doing

chmod -R o+w media

will not necessarily allow apache to write in media directory, if apache don't own this directory.

You should check that apache actually own media directory, by checking first which user apache is running as, and then ajust permissions accordingly :

chown -R <apache_user> media
chmod -R o+w media

More information here: Magento Filesystem Permissions

Sign up to request clarification or add additional context in comments.

3 Comments

I had a similar issue as the OP, setting the /media ownership to that of the user running Apache did the trick.
or when the media folder is not created
This has a serious error: It doesn't just make the folder writable by the apache user, it makes the folder writable by everyone. DO NOT DO THIS. It opens a massive security hole.
16

A much simpler approach is to just head over to magento database and alter the table core_config_data manually. There should be an entry named dev/js/merge_files and dev/css/merge_files.
These two should hold values of 1.By setting these two values to 0, you'll get this fixed and your css and js files should be loadable again. tested in magento 1.5.x.

1 Comment

Just in case someone sees this now, the css field path in the core_config_data table has been changed to dev/css/merge_css_files
3

I ended up fixing it by being able to disable CSS merge by browsing to the relevant admin page and entering configForm.submit() in my java console to save the settings.

Not sure why CSS merge started using the file system paths of all a sudden, I wasn't changing anything associated with that (the module I was installing was for invoices). I've had a lot of randoms problem like this with Magento, it seems to require constant tinkering. I definitely am hesitant to recommend another client go with Magento again.

2 Comments

I'll be damned if that didn't fix it.. know why or ever figure out the root to this?
I stopped using Magento shortly after this. One major contributing factor was because all of these bugs. They seem to be more focused on Magento Go now than supporting the open source version.
1

If you're using Fooman Speedster, just uninstall it from the Magento Connect Package Manager.
Then, reinstall it.

Don't use the reinstall feature in the package manager, because it will not work.

Comments

0

Sometimes, you need to make sure that you have the media folder in your Magento root directory.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.