• I installed the latest nightly (8/17) to fix the permalink problem that fixed the trackback problem. Now there’s a new problem.
    After clicking around on my site for a while, all of the formatting disappears like I have no style sheet. All of the “Edit This” links are gone. To fix it, I hit the “Login” link, and I’m sent here:
    https://www.chasingthewind.net/wordpress/wp-login.php?redirect_to=/wordpress/wp-admin/wp-login.php%3Fredirect_to=/wordpress/wp-trackback.php/wp-trackback.php/wp-images/smilies/wp-style/Blue+Swirly/wp-images/smilies/wp-images/smilies/wp-images/smilies/wp-admin/wp-images/smilies/wp-images/smilies/wp-images/smilies/wp-images/smilies/wp-images/smilies/wp-style/Blue+Swirly/wp-images/smilies/wp-images/smilies/wp-style/Blue+Swirly/wp-images/smilies/wp-style/Blue+Swirly/wp-images/smilies/wp-images/smilies/wp-images/smilies/wp-images/smilies/wp-images/smilies/wp-images/smilies/wp-images/smilies/wp-images/smilies/wp-images/smilies/wp-images/smilies/wp-style/Blue+Swirly/wp-login.php
    That’s what’s in my address bar. I get the login prompt anyway and login. I can tell my cookie is still there; I’m using Alex’s Style Sheet Switcher and whatever style sheet I had before is returned.
    Some of my visitors tell me they’re losing the style sheet, too, but closing their browser and reopening it seems to fix it.
    What’s with that weird redirect / wp-images/smilies address?

Viewing 15 replies - 16 through 30 (of 42 total)
  • Thread Starter sphyr

    (@sphyr)

    TechGnome –
    1 – My style switcher is located in \wordpress\wp-content\plugins\wp-syle-switcher.php.
    2 – Actually, I did, a little, back in April, I think. The original style-switcher expected my blog to be located at \wordpress\index.php, but it’s located in the root folder. That was a long time ago, and I used some instructions I found on these forums to modify it. I’ll post the code in a moment if you think that’ll be of some help. I don’t know php, so much f that coding is greek to me.
    3 – The actual styles are located in \wordpress\wp-style\Blue_Swirly\ etc.
    Here’s my wp-style-switcher.php code:
    <?php
    // WP Style Switcher
    // version 1.2, 2004-03-03
    //
    // copyright 2004 Alex King
    // https://www.alexking.org/software/wordpress/
    /*
    Plugin Name: WP Style Switcher
    Plugin URI: https://www.alexking.org/software/wordpress/
    Description: A CSS Style Switcher for WordPress.
    Author: Alex King
    Author URI: https://www.alexking.org/
    */

    // change this to the name of default style you want to use
    $wp_style_default = 'Blue Swirly';
    function wp_style_cookie($default = "") {
    global $wp_style_default;
    if (empty($default)) {
    $default = $wp_style_default;
    }
    $expire = time() + 30000000;
    $urlinfo = parse_url(get_settings('home'));
    $path = $urlinfo['path'];
    $domain = $urlinfo['host'];
    if (!empty($_GET["wpstyle"])) {
    setcookie("wpstyle"
    ,stripslashes($_GET["wpstyle"])
    ,$expire
    ,$path
    ,$domain
    );
    header("Location: ".get_settings('home'));
    }
    else if (empty($_COOKIE["wpstyle"])) {
    setcookie("wpstyle"
    ,$default
    ,$expire
    ,$path
    ,$domain
    );
    }
    }
    function wp_stylesheet($default = "") {
    global $wp_style_default;
    if (empty($default)) {
    $default = $wp_style_default;
    }
    if (!empty($_COOKIE["wpstyle"]) && file_exists('wordpress/wp-style/'.$_COOKIE["wpstyle"].'/style.css')) {
    $style = $_COOKIE["wpstyle"];
    }
    else {
    $style = $default;
    }
    echo get_settings('siteurl').'/wp-style/'.$style.'/style.css';
    }
    function wp_style_switcher($in_list = 1, $type = "text", $preview = 0) {
    $styles = array();
    $path = "wordpress/wp-style/";
    if ($handle = opendir($path)) {
    while (false !== ($file = readdir($handle))) {
    if (is_dir($path.$file) && file_exists($path.$file.'/style.css') && substr($file, 0, 1) != '.') {
    $styles[] = $file;
    }
    }
    }
    closedir($handle);
    if (count($styles) > 0) {
    asort($styles);
    reset($styles);
    $ss = '<ul id="styleswitcher">'."\n";
    foreach ($styles as $style) {
    switch ($type) {
    case "sample":
    if (file_exists('wp-style/'.$style.'/sample.gif')) {
    $sample = get_settings('siteurl').'/wp-style/'.$style.'/sample.gif';
    }
    else {
    $sample = get_settings('siteurl').'/wp-style/sample.gif';
    }
    $display = '<img src="'.$sample.'" alt="'
    .htmlspecialchars($style).'" title="Use this Style" />';
    break;
    default:
    $display = htmlspecialchars($style);
    break;
    }
    if ($preview != 0) {
    if (file_exists('wp-style/'.$style.'/screenshot.gif')) {
    $display .= '

    .'/wp-style/'.$style.'/screenshot.gif">Screenshot';
    }
    }
    if (!empty($_COOKIE["wpstyle"]) && $_COOKIE["wpstyle"] == $style) {
    $ss .= '

    • '.$display.'
    • '."\n";
      }
      else {
      $ss .= '


    • .get_settings('home').'/'.get_settings('blogfilename')
      .'?wpstyle='.urlencode($style).'">'
      .$display.'
    • '."\n";
      }
      }
      $ss .= '
      ';
      }
      if ($in_list == 1) {
      $ss = '<li id="style">Style:'.$ss.'
      ';
      }
      echo $ss;
      }
      wp_style_cookie();
      ?>

    Thread Starter sphyr

    (@sphyr)

    Apparently it’s seriously munged now; everybody’s emailing me and telling me they can’t comment and the style is gone.
    I tried disabling the style switcher to no avail, but I’m sort of limited from work what I can edit. Weird how it worked for weeks before suddenly hiccuping like that.

    Thread Starter sphyr

    (@sphyr)

    With the formatting munged, I used the “view source” option in IE, and found this:
    <style type="text/css" media="screen">
    /* @import url( https://chasingthewind.net/wordpress/wp-login.php?redirect_to=/wordpress/wp-images/smilies/wp-style/Blue%20Swirly/wp-style/Blue%20Swirly/wp-images/smilies/wp-images/smilies/wp-images/smilies/wp-layout.css );
    Original line above deactivated for Alex's Style Switcher below */
    @import url( "https://chasingthewind.net/wordpress/wp-login.php?redirect_to=/wordpress/wp-images/smilies/wp-style/Blue%20Swirly/wp-style/Blue%20Swirly/wp-images/smilies/wp-images/smilies/wp-images/smilies/wp-style/Blue Swirly/style.css" );
    </style>

    The actual code in my index.php is
    <style type="text/css" media="screen">
    /* @import url( <?php echo get_settings('siteurl'); ?>/wp-layout.css );
    Original line above deactivated for Alex's Style Switcher below */
    @import url( "<?php wp_stylesheet("Blue Swirly"); ?>" );
    </style>

    I don’t think it’s a style switcher problem; I type in my address bar https://www.chasingthewind.net/wordpress/wp-admin and I’m redirected to https://chasingthewind.net/wordpress/wp-login.php?redirect_to=/wordpress/wp-images/smilies/wp-style/Blue%20Swirly/wp-style/Blue%20Swirly/wp-images/smilies/wp-images/smilies/wp-images/smilies/wp-images/smilies/wp-images/smilies/wp-login.php?redirect_to=%2Fwordpress%2Fwp-admin%2F, which is an unformatted wordpress login screen.

    Where IS your blog files, in the root, or in a WordPress folder? You said it was in the root, but half the code refers to a wordpress folder. So I’m a little confused.
    The best way to determin if it is the style switcher or not is to go to the plugins options page, disable it, remove the call from your index.php, and manualy hard code it to pull from the BlueSwirly.css file. Clean out your cache, and cookies too. Then trye re-navigating the site, and loging in too and see what happens.
    Tg

    Thread Starter sphyr

    (@sphyr)

    The index.php is in the root. The WordPress install is in a WordPress folder.

    Thread Starter sphyr

    (@sphyr)

    I feel like I’m talking to myself. :/
    I’m running the default WordPress installation and I’m still having troubles.
    Any suggestions?

    Thread Starter sphyr

    (@sphyr)

    Still trying to track down the bug. Alone. In the dark. ??
    Using php-admin, in the wp_options table, I see option_name = siteurl and the option_value=https://chasingthewind.net/wordpress/wp-login.php?redirect_to=/wordpress/wp-images/smilies/wp-images/smilies/wp-images/smilies/wp-images/smilies
    I reset this manually to https://www.chasingthewind.net. After a while, the “www” disappears and the option_value=https://chasingthewind.net. Twenty minutes later, it’s that gibberish with the wp-image/smilies again
    What would cause the siteurl option_value to be overwritten?
    I’m pretty sure it has something to do with the siteurl value being overwritten by something, and after that style sheets don’t load, users can’t comment, cookies get broken, etc.
    I’ve been at this for weeks now. I could really use some help.

    Thread Starter sphyr

    (@sphyr)

    I’m a poster child for WordPress tech support. Is there a special code word I have to say, or do I have to hold my tongue just right to get a developer to look at my problem? I’m almost ready to chunk the whole mess and convert to some other software.

    I’ll flag your problem up…could you post your OS, the mysql and php versions and current wp version ?

    Thread Starter sphyr

    (@sphyr)

    Hosted at godaddy.com.
    OS = Linux
    mysql = 4.0.14
    php = 4.3.2
    wp = 1.3 nightly 8/26, but I’ve had the same issue with the 8/10, 8/17, 8/24 nightlies.

    ‘Blue Swirly’ isn’t a valid option for the default style. It needs to be the name of the style folder (‘blue_swirly’ perhaps?).

    Thread Starter sphyr

    (@sphyr)

    Day 19. WordPress still munged. Still need help.

    Thread Starter sphyr

    (@sphyr)

    I see the “www.” in front of the chasingthewind.net is missing in your post again. Just the mere act of me logging in and verifying the https://www.chasingthewind.net/wordpress is correct will fix the site for 30 minutes or so.
    I used myphpadmin to search for “smilies”.
    There is 1 match in wp_posts. That one looks ok; it’s a post about the problems I’m having.
    There are 2 matches in wp_options. One is “use_smilies=Y” and the other is siteurl=https://chasingthewind.net/wordpress/wp-login.php?redirect_to=/wordpress/wp-images/smilies. I’ve manually set that back to https://www.chasingthewind.net again, but it won’t stick. Something will overwrite that and it’ll be munged again.
    Just for grins, I’m also going to set that “use_smilies” to “N”.

    When you did the fresh install, did you first delete every wp file and folder that was there before, then upload new ?
    If you kept any files, which ones were they ?
    Is your host having any database problems at all ?
    If this were my blog, I would:

    1. backup the database to my machine
    2. backup index.php / wp-layout.css
    3. then delete everything, including the database and the wordpress folder.
    4. change my passwords for the mysql
    5. then create a fresh database, import the sql dump and use a newly downloaded 1.2mingus
    6. and make no changes at all ( apart from blogging) for 24 hours

    OR

    1. backup the database
    2. create a new directory (wordpress2) and again install a fresh copy of 1.2 and import the sql dump. This would be a copy of your site, just in a different directory.

    My thinking would be that if the interference is coming from outside (which it probably is not), a new password will stop that, and that maybe a rogue file is somewhere, so deleting everything completely rules that out.
    If the problem persists, then it must be from data held in the database ? But I don’t see how that can do anything as data is just data – it sits there doing nothing.
    But.. if the problem DOES persist, doing something like this has just ruled a lot of causes out.

    Thread Starter sphyr

    (@sphyr)

    Does your advice change if I’m running a 1.3 nightly? Are there any database changes that would be a problem if I reverted back to 1.2?
    I didn’t delete all the old files first, but I’ll do that now. I’ll try deleting all the WordPress files and do another fresh install and see if that makes any difference.
    I’ve never done a backup/restore of the mysql tables, so the next step of deleting the database will require a little study.

Viewing 15 replies - 16 through 30 (of 42 total)
  • The topic ‘Odd Login / Losing Style Sheet’ is closed to new replies.