WordPress.org

Ready to get started?Download WordPress

Forums

Odd Login / Losing Style Sheet (42 posts)

  1. Mark (podz)
    Support Maven
    Posted 9 years ago #

    I just hopped over about 20 pages on your site and had no problems, even switching styles.
    Smilies address ?
    If the 'Edit This' links suddenly go, and they were there, it sounds like you are being logged out.......

  2. Sphyr
    Member
    Posted 9 years ago #

    It's still happening to me this morning from my office computer. Perhaps the behavior is different when you are logged in.
    I've turned on registration; can you login and surf around and see if the formatting disappears on you?

  3. Mark (podz)
    Support Maven
    Posted 9 years ago #

    Okay, will do now.

  4. Mark (podz)
    Support Maven
    Posted 9 years ago #

    Still looks fine on every page......tried each style, each category, individual posts, links to comments made, home link - the styling stays consistent with whatever I have selected.
    I'm not helping much here :)

  5. Sphyr
    Member
    Posted 9 years ago #

    Thanks for trying. :/
    I hate it when stuff won't break on command.

  6. Mark (podz)
    Support Maven
    Posted 9 years ago #

    Does this only happen when people are viewing on work computers where cookies may be limited ?

  7. Sphyr
    Member
    Posted 9 years ago #

    It happens both from my work computer and home computer. Although there's a firewall with both, I don't believe cookies are limited at either location.
    One of the fixes I tried last night included deleting all cookies and clearing my cache, but the problem was almost immediate. I loaded my home page fine, hit refresh, and the style disappeared and I was logged out. Clicking the login button gave me that extended redirect link I listed in the original post.

  8. Sphyr
    Member
    Posted 9 years ago #

    A co-worker told me the formatting was gone this morning on my site. When she tried to post a comment, she was redirected to a login screen (it's the WordPress login screen but it's unformatted). She's a visitor that shouldn't have to login to comment.
    Here's the link she was directed to:
    http://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-images/smilies/wp-images/smilies/wp-images/smilies/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-admin/wp-admin/wp-images/smilies/wp-images/smilies/wp-images/smilies/wp-images/smilies/wp-comments-post.php
    It's similar to the one I was directed to, but not the same. And while I couldn't reproduce this bug yesterday with Podz, today it seems it's happening to more than one person. I'm still running the 8/17 nightly; I didn't make any modifications to WordPress last night.
    Podz, can you take a look at it again this morning?

  9. Mark (podz)
    Support Maven
    Posted 9 years ago #

    I appear, and the bugs go hide in the corners....... all seems fine here yet again!

  10. Mark (podz)
    Support Maven
    Posted 9 years ago #

    Nooo......Firefox.9.3
    I'll try with IE though.

  11. Mark (podz)
    Support Maven
    Posted 9 years ago #

    Err... still all good...for me anyway.
    Sorry !

  12. Sphyr
    Member
    Posted 9 years ago #

    Thanks for trying. It randomly exhibits that problem and I can't get it to stay broke. I would think that long redirect address above with all the wp-smilies might offer a clue. Perhaps once more people are using the 1.3 nightly, somebody else might exhibit a similar problem.

  13. Sphyr
    Member
    Posted 9 years ago #

    After behaving itself for nearly 2 weeks, the style sheets and that weird redirect problem returned today, for me and at least 1 other user.
    I'm not really looking for a solution, just flagging a potential problem and hope others might have something similar.

  14. TechGnome
    Moderator
    Posted 9 years ago #

    Ok, it is borked. (borked is kinda like broke, but different).
    Something in the call to the style switcher is causing the URL for the CSS to become corrupted.
    It looks like this:
    http://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-images/
    smilies/wp-images/smilies/wp-images/smilies/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-admin/wp-admin/wp-images/smilies/wp-images/
    smilies/wp-images/smilies/wp-images/smilies/wp-style/
    Blue+Swirly/wp-images/smilies/wp-style/Blue%20Swirly/
    wp-style/Blue%20Swirly/wp-style/Blue%20Swirly/wp-images/
    smilies/wp-images/smilies/wp-images/smilies/wp-images/
    smilies/wp-images/smilies/wp-style/Metal%20Dreams/
    wp-images/smilies/wp-images/smilies/wp-images/smilies/
    wp-images/smilies/wp-admin/wp-images/smilies/wp-images/
    smilies/wp-images/smilies/wp-admin/wp-style/Blue%20Swirly/
    wp-images/smilies/wp-style/Wordpress/style.css
    Which doesn't look quire right.
    I don't know if it's aproblem with 1.3 or if it's a problem with the switcher, or it something else is going on here.
    1) Where is the file for your style switcher located?
    2) Did you change any of the code in there?
    3) Where are your styles located?
    TG

  15. TechGnome
    Moderator
    Posted 9 years ago #

    FYI: I inspected my cookies after changing a style (which didn't appear to work) and the domain listed for the cookie was ".www.chasingthewind.net" (note the period BEFORE the www).
    Not sure, but could THAT be the problem?
    TG

  16. Sphyr
    Member
    Posted 9 years ago #

    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
    // http://www.alexking.org/software/wordpress/
    /*
    Plugin Name: WP Style Switcher
    Plugin URI: http://www.alexking.org/software/wordpress/
    Description: A CSS Style Switcher for WordPress.
    Author: Alex King
    Author URI: http://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 .= '

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

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

  • Sphyr
    Member
    Posted 9 years ago #

    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.

  • Sphyr
    Member
    Posted 9 years ago #

    With the formatting munged, I used the "view source" option in IE, and found this:
    <style type="text/css" media="screen">
    /* @import url( http://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( "http://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 http://www.chasingthewind.net/wordpress/wp-admin and I'm redirected to http://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.

  • TechGnome
    Moderator
    Posted 9 years ago #

    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

  • Sphyr
    Member
    Posted 9 years ago #

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

  • Sphyr
    Member
    Posted 9 years ago #

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

  • Sphyr
    Member
    Posted 9 years ago #

    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=http://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 http://www.chasingthewind.net. After a while, the "www" disappears and the option_value=http://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.

  • Sphyr
    Member
    Posted 9 years ago #

    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.

  • Mark (podz)
    Support Maven
    Posted 9 years ago #

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

  • Sphyr
    Member
    Posted 9 years ago #

    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.

  • Alex King
    Member
    Posted 9 years ago #

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

  • Sphyr
    Member
    Posted 9 years ago #

    Day 19. WordPress still munged. Still need help.

  • Sphyr
    Member
    Posted 9 years ago #

    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 http://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=http://chasingthewind.net/wordpress/wp-login.php?redirect_to=/wordpress/wp-images/smilies. I've manually set that back to http://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".

  • Mark (podz)
    Support Maven
    Posted 9 years ago #

    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.

  • Sphyr
    Member
    Posted 9 years ago #

    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.

  • 12

    Topic Closed

    This topic has been closed to new replies.

    About this Topic

    Tags

    No tags yet.