• Hi, i believe i have found a bug in Alex’s CSS Style Switcher. If someone has visited the site and chosen a style, and if i then make that style unavailable, when the person comes back the site is loaded with no styling at all, only plain text. I know, it is not really a bug, but one might expect the Switcher to choose the default style if it can’t find the directory for the style the cookie specifies.

Viewing 5 replies - 1 through 5 (of 5 total)
  • I consider an unhandled situation like that a bug, I’ll fix it.

    Thread Starter anatman

    (@anatman)

    Thank you Alex! If i knew any PHP, i would have tried to contribute something. I will keep an eye on your site for the update.

    Alex, has this been fixed yet? ??

    So it works until you add some other code? That sounds like something you’ll need to track down.

    Thread Starter anatman

    (@anatman)

    The switcher works everywhere: in WP’s index.php, in the form i created (which uses WP’s index.php’s headers). What doesn’t work is: it seemingly doesn’t fetch the reader’s cookie when the wp_stylesheet() function is called via another file reading the header where the function is from the template i created. You see, wp_stylesheet() even returns the default value for the style, it just doesn’t return the value set by the cookie.
    As this is the same behavior as what happens when i run the style switcher locally on my computer, i thought you might know what is happening.
    I now zero, nil, nothing about PHP, all i say here is only from observing the output… i wish i were able to track it down…

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘possible bug in CSS Style Switcher’ is closed to new replies.