Forums

Why does it search for "ie_hacks.css" in the post subdirectories? (12 posts)

  1. Anonymous
    Unregistered
    Posted 2 years ago #

    Hello!

    Looked at some log files and found out that my wordpress have trouble locating some files, especially the "ie_hacks.css" of my theme. This seems to be happening a LOT according to the number of 404 errors in the log. Problem seems to be that WordPress is looking for this file in the respective POST SUBDIRECTORIES (see examples).
    Is there any way to get around this, maybe specifying a "root" directory where WordPress is supposed to always search first for these types of files?

    http://www.caputmundicibus.com

    excerpt log:

    ---------------------------------
    Required but not found URLs (HTTP code 404)

    /wp-content/themes/carpediem/ie_hacks.css
    /2008/12/saffron-buns-brioche-allo-zafferano/wp-content/themes/carpediem/ie_hacks.css
    /2008/10/lemon-tarte-torta-di-limone/wp-content/themes/carpediem/ie_hacks.css
    /page/3/wp-content/themes/carpediem/ie_hacks.css

    ----------------------------------------------------------------

    Any suggestions?

    Thank you!

    / john

  2. Michael Fields
    Theme Wrangler
    Posted 2 years ago #

    Hi John,
    If you view the source of your site you will find the following code a few lines down:

    <!--[if IE]> <link rel="stylesheet" href="wp-content/themes/carpediem/ie_hacks.css" type="text/css" media="screen" />

    This is a conditional comment which will serve a style sheet meant only for Internet Explorer. Unfortunately, it appears that there was a small oversight on the behalf of the person who added this code to you theme. They have used a relative url:

    wp-content/themes/carpediem/ie_hacks.css

    Due to the fact that you are using custom permalinks, this stylesheet will only be served on your home page. To fix it, you will need to locate the line that it is defined on (most likely in header.php). and replace it with:

    <!--[if IE]> <link rel="stylesheet" href="<?php bloginfo( 'url' ); ?>/wp-content/themes/carpediem/ie_hacks.css" type="text/css" media="screen" />

    Hope this helps,
    -Mike

  3. Anonymous
    Unregistered
    Posted 2 years ago #

    That was it! a thousand thanks!

  4. Michael Fields
    Theme Wrangler
    Posted 2 years ago #

    no problem :)

  5. Anonymous
    Unregistered
    Posted 2 years ago #

    Could we do the same thing here? :

    -----------------------------------

    <embed
    src="http://www.caputmundicibus.com/imagerotator.swf"
    width="196"
    height="164"
    allowscriptaccess="always"
    allowfullscreen="true"
    flashvars="file=imagerotator.xml&transition=bgfade&showicons=false&shownavigation=false" />

    -----------------------------------

    This is my image rotator which is causing me basically the same problem. It´s in the sidebar, and works great as long as you´re in the root directory. As soon as you go into a subdirectory (as in clicking on a specific post) it does not work. Then it acts as if imagerotator.xml were in THAT SUBDIRECTORY.

    Example error:

    /2009/09/stuffed-baby-squid-calamaretti-ripieni/imagerotator.xml

    Thanks!

    / john

  6. Michael Fields
    Theme Wrangler
    Posted 2 years ago #

    John, I answered a question similar to this a while back, please read this thread and see if it makes sense to you, I think that it is the same kind of problem. Let me know how it works for you.

    http://wordpress.org/support/topic/233088?replies=11

  7. Anonymous
    Unregistered
    Posted 2 years ago #

    It certainly looks like almost exactly the same problem, only editing the .htaccess file didn´t work for me :(

    And editing the flash script I wouldn´t know how to do...

    I´m actually surprised that the htaccess trick didn´t work, something wrong here? :

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule imagerotator.xml$ /imagerotator.xml [L]

    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress

  8. Anonymous
    Unregistered
    Posted 2 years ago #

    UPDATE!:

    I did it!
    The little rewrite in htaccess TOGETHER with and edit of the actual xml-file, changing the paths made it all work!

    Yippie!
    Thanks a lot Mike!

  9. Michael Fields
    Theme Wrangler
    Posted 2 years ago #

    No problem, ellohn. Glad to hear that you got it to work!

  10. Anonymous
    Unregistered
    Posted 2 years ago #

    Mr Fields! Got another no-brainer for you if you please could help! :)

    Have a quick look at my site Caput mundi cibus

    In the sidebar you´ll notice that all the headings like "archives", "search" and so on are slightly gray EXCEPT the first one (the twitter one). All of them are <h2>! Where´s the difference? How do I make it the same as the others?

    Thank you!

    / john

  11. Michael Fields
    Theme Wrangler
    Posted 2 years ago #

    Sorry, I have no idea - I don't really answer CSS questions here.

  12. Rev. Voodoo
    Volunteer Moderator
    Posted 2 years ago #

    @ellohn It's because it's a link.

    All the other headings are in fact <h2> like you said, but the twitter heading is actually an <h2><a>

    so you'll notice it actually matches the way your post titles look (including the hover state colour change). You'll need to account for it specifically in your css....

    something like
    #sidebar h2 a { or thereabouts....

Topic Closed

This topic has been closed to new replies.

About this Topic