ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

EE2 Stylesheet Links Not Working

February 14, 2011 1:27pm

Subscribe [2]
  • #1 / Feb 14, 2011 1:27pm

    mprzybyla

    2 posts

    Hello,

    I’m having an issue with EE2.1.3 and CSS links not working on my localhost (Mac OSX 10.6.6 MAMP).  The problem seems to be related to a missing “/” when the cached version of the stylesheet is produced.

    If I create a new template called _/includes/main_css and set it as filetype css, I can then view that stylesheet at:
    http://localhost/mysite/index.php/?css=_includes/main_css

    So far so good. 

    However, if I look at the final rendered page, the CSS gets cached and a version number is appended.  Additionally, the “/” after index.php is taken out, so I end up with a URL like so:
    http://localhost/mysite/index.php?css=_includes/main_css.v.1297702923 (notice the missing “/” after index.php)

    The above URL does not work on my localhost.

    However, if I add that slash back in manually like this, the stylesheet is displayed just fine:
    http://localhost/mysite/index.php/?css=_includes/main_css.v.129770292

    Has anyone else run into this problem?

    Just to clarify, I am using the {stylesheet=template_group/css_template} method.  The {path=template_group/css_template} method works fine.

  • #2 / Feb 14, 2011 4:16pm

    Ingmar

    29245 posts

    ... so I end up with a URL like so:
    http://localhost/mysite/index.php?css=_includes/main_css.v.1297702923 (notice the missing “/” after index.php)

    That is expected behavior and should work. Are you removing index.php from your URLs or use mod_rewrite in some other way?

  • #3 / Feb 15, 2011 6:47am

    mprzybyla

    2 posts

    Yes, mod_rewrite is installed on my MAMP setup, but I am not using it to rewrite any URLs for this site.  I think it may have something to do with the way this version of MAMP runs PHP, I’m not sure.

    In any case, I’ve reinstalled the site on my secondary localhost (native Apache install) and the {stylesheet=} tags work fine.

    Thanks,

  • #4 / Feb 15, 2011 3:41pm

    Marcus Neto

    1005 posts

    mprzybyla, thanks for letting us know. Please don’t hesitate to start a new thread if you have another issue.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases