Wordpress MU CSS not loading - any advice?

10 replies
I have a problem with a new website on HostGator. I have installed WordPress Multi-User, and most everything seems to be working properly, EXCEPT, almost 90% of the time (but, not all of the time) the CSS is not called on first page load in a new browser. Clicking on the "Refresh" button corrects the problem

HostGator support looked at the Apache error logs and discovered that the name of the theme that is being called is not being inserted into the style import line.

On first load into a new browser, the page source shows ...

Code:
<style type="text/css" media="screen">
    @import url(http://my_domain.com/wp-content/themes//style.css);
</style>
When I hit refresh, the source shows ...

Code:
<style type="text/css" media="screen">
    @import url(http://my_domain.com/wp-content/themes/my_theme/style.css);
</style>
Anyone have any idea what could be causing this?

Many thanks in advance,
Kirk
#advice #css #loading #wordpress
  • Profile picture of the author HomeComputerGames
    Hello Kirk!
    I've been playing around with MU for my travel blog and had various issues with it. Not the least was the update overwriting changes..sigh..

    Is your setup for sub-domains or sub directories?
    I had a bad time with the sub domains and switched to sub directories.

    Are you using Super Cache per chance?
    Signature

    yes, I am....

    {{ DiscussionBoard.errors[1906556].message }}
    • Profile picture of the author Kirk Ward
      I have it set up for sub-domains, but I'm not using Super Cache.

      Would like to stay with sub-domains.

      This actually seems to be related to the theme. I'm using an older (2.6 - 2.7 era) theme, and thinking its limited to it. I'll be switching to a newer theme and seeing if it makes a difference.

      Cheers, and thanks for looking at this.
      Signature
      "We are not here to sell a parcel of boilers and vats, but the potentiality of growing rich beyond the dreams of avarice."

      Dr. Samuel Johnson (Presiding at the sale of Thrales brewery, London, 1781)
      {{ DiscussionBoard.errors[1907097].message }}
  • Profile picture of the author Kirk Ward
    Had a "Brain Burp" thinking that it may be the "Redirection" plugin not being compatible with WPMU. Anyone have any experience on this?
    Signature
    "We are not here to sell a parcel of boilers and vats, but the potentiality of growing rich beyond the dreams of avarice."

    Dr. Samuel Johnson (Presiding at the sale of Thrales brewery, London, 1781)
    {{ DiscussionBoard.errors[1907284].message }}
  • Profile picture of the author HomeComputerGames
    I had several strange events while setting my WPMU up. I originally went with sub domains and had issues with things working one minute and then not working the next. I fiddled with it for quite some time actually and I am no noob to the inner workings of web programs.

    After a couple more installs and trials I set up sub directories. So far no real issues except when making modifications to the default template that is displayed to guests. Any WP updates done automatically overwrites everything you have modified..lol
    So be aware and make backups..

    If you find a solution please let us know.

    Good Luck Kirk!

    Ken
    Signature

    yes, I am....

    {{ DiscussionBoard.errors[1911256].message }}
  • Profile picture of the author cma01
    Do you have to import it? I just link to my stylesheets in WPMU.

    Code:
    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
    Signature
    "Wise men talk because they have something to say; fools, because they have to say something."
    ~ Plato
    {{ DiscussionBoard.errors[1912240].message }}
  • Profile picture of the author Kirk Ward
    Thanks Carla,

    That makes sense, but I wasn't sure how to do it.

    Kirk
    Signature
    "We are not here to sell a parcel of boilers and vats, but the potentiality of growing rich beyond the dreams of avarice."

    Dr. Samuel Johnson (Presiding at the sale of Thrales brewery, London, 1781)
    {{ DiscussionBoard.errors[1917939].message }}
  • Profile picture of the author Kirk Ward
    Hi again Carla,

    I went to edit my theme header and saw where I had changed that call to the one you suggested (based on feedback from the folks at wpmudev.org), however, I am still getting the same result.

    I've also removed all my MU plugins and reinstalled them, one at a time, and the problem still exists. Not as frequently as before, but still there nonetheless.

    This is getting to be a pain in the gazitchka.
    Signature
    "We are not here to sell a parcel of boilers and vats, but the potentiality of growing rich beyond the dreams of avarice."

    Dr. Samuel Johnson (Presiding at the sale of Thrales brewery, London, 1781)
    {{ DiscussionBoard.errors[1918618].message }}
    • Profile picture of the author Luke Graham
      Kirk,

      I have never, ever, seen this on my WPMU site.

      Forget plugins for the moment (a plugin can load header stuff itself which is easy to narrow down). What theme are you using - and does it work from if you change it?

      The themes header may have a lapse include - id check that first. If you want more help, i dont mind taking a look for you. (PM sent, (no im not offering services - free).
      Signature
      Best Ways To Make Money Online

      Eight bytes walk into a bar. The bartender asks, “Can I get you anything?”
      “Yeah,” reply the bytes. “Make us a double.”
      {{ DiscussionBoard.errors[1918640].message }}
      • Profile picture of the author Kirk Ward
        Originally Posted by Luke Graham View Post

        Kirk,

        I have never, ever, seen this on my WPMU site.

        Forget plugins for the moment (a plugin can load header stuff itself which is easy to narrow down). What theme are you using - and does it work from if you change it?

        The themes header may have a lapse include - id check that first. If you want more help, i dont mind taking a look for you. (PM sent, (no im not offering services - free).
        Hi Luke,

        Thanks, and I'll be getting in touch.

        I understand that it is not frequent. However, I have found at least a half dozen other posts and threads across the interweb where this exact same result is occurring and folks are solving it or not solving it. The solutins that seem to have worked for others either haven't worked for me, or don't seem to exist. For example, one guy edited his wp_2_options table, but my install didn't produce a wp_2_options table. A wp_1_options, a wp_3_options, and a wp_4_optins, but no wp_2_options.

        It seems to be occurring across all themes on my site, those designed for single blog WP and those designed for multi-blog WPMU (all from wpmudev.org). It occurs randomly, but sometimes goes through stages where it occurs more frequently than others. It has been reproduced by others, and is not exclusive to one browser or another It has occurred on multiple PC's for me. (I just had a very expensive lightning strike where I had to replace a lot of home electronics, including PC's and laptoips.)

        It is very frustrating, and I'm supposed to show off my site during a webinar on Monday.

        That'll be a hoot.
        Kirk

        PS - How do I check if my themes are incurring a "lapse." That sounds like something interesting. Maybe one part of the code is running before the next and missing a call?
        Signature
        "We are not here to sell a parcel of boilers and vats, but the potentiality of growing rich beyond the dreams of avarice."

        Dr. Samuel Johnson (Presiding at the sale of Thrales brewery, London, 1781)
        {{ DiscussionBoard.errors[1918698].message }}
        • Profile picture of the author cma01
          I would just view the source of the page to make sure it is linking (or importing) the right file.

          Every once in awhile, a stylesheet won't load. It's just a thing with my internet connection and it happens on any site.

          If you're sure it is WPMU, view the source the next time that happens.

          The only time I've had anything remotely similar happen on a WPMU install is after an update to Popularity Contest and the plugin stopped working.

          The issue was that the plugin called http://www.domain.com and I had to modify it to call http://domain.com since your WPMU sites aren't going to be using the www.
          Signature
          "Wise men talk because they have something to say; fools, because they have to say something."
          ~ Plato
          {{ DiscussionBoard.errors[1920242].message }}

Trending Topics