Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Admin css missing due to using file system path
 
reflexiv
Jr. Member
 
Avatar
Total Posts:  17
Joined:  2011-11-29
 

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+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!

 
Magento Community Magento Community
Magento Community
Magento Community
 
goivvy
Guru
 
Avatar
Total Posts:  322
Joined:  2010-12-15
Moscow, Russia
 

href in link tag is a relative path

is the file yourdomain.com/home/user/public_html/skin/adminhtml/default/default/print.css available when viewed in the browser?

use:

href="<?php echo $this->getSkinUrl('print.css'); ?>"
 
Magento Community Magento Community
Magento Community
Magento Community
 
reflexiv
Jr. Member
 
Avatar
Total Posts:  17
Joined:  2011-11-29
 

Yes I can access them fine when using the correct URL path.

href="<?php echo $this->getSkinUrl('print.css'); ?>"

Where does that go?

 
Magento Community Magento Community
Magento Community
Magento Community
 
goivvy
Guru
 
Avatar
Total Posts:  322
Joined:  2010-12-15
Moscow, Russia
 

in your header.phtml or whatever your template is

 
Magento Community Magento Community
Magento Community
Magento Community
 
reflexiv
Jr. Member
 
Avatar
Total Posts:  17
Joined:  2011-11-29
 

Well all my template files include the code:

<?php echo $this->getChildHtml('head'?>
So it’s getting the <head> from somewhere else.

I ended up fixing it by being able to disable CSS merge by browsing to the relevant admin page and typing this in my java console to save the settings:

configForm.submit()

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). It seems like 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.

Thanks for the suggestion.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top