• Resolved coryshubert

    (@coryshubert)


    I am very bummed out. I did the normal update to WP 3.0.2 as I always do when one is available, and it wiped out CSS changes I had made to my template’s CSS style sheet as well as changes I had made to certain php files… WTF is up with that WordPress?

    How would updating the WP core files mess with my template files which are not part of the WP offerings or base code? How could this happen?

    This is either a bug or something wrong because of all the WP sites I manage and have made, many by the way, NONE have ever changed or showed this mess up due to a WP update, none!

Viewing 15 replies - 1 through 15 (of 16 total)
  • This is maddening. On our blog the update happened automatically before I could backup the files. All of our changes are gone and we’re stuck with the default twenty-ten template.

    Tragic. Is there a way to revert? Is all of our hard work just GONE???

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    πŸ³οΈβ€πŸŒˆ Advisor and Activist

    Short answer: This is expected behavior.

    Long Answer:
    If you updated the twenty-ten theme directly then yes, every time you update, you will wipe out your changes.

    Unless you have a good backup (which you should always take BEFORE upgrading), no, you cannot revert.

    Next time, don’t edit twenty-ten directly. Make a child theme. http://codex.wordpress.org/Child_Themes

    Helpful, thank you @ipstenu.

    It’s frustrating because I expressly DID NOT update so I could make a backup, then when I logged in this morning the update had happened on its own.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    πŸ³οΈβ€πŸŒˆ Advisor and Activist

    Doesn’t work that way.

    No, really. WordPress cannot update on it’s own. Now, you may have a plugin that does it, or another admin on your site might have done it (or maybe a script from your webhost), but WordPress itself absolutely did not do that.

    Thread Starter coryshubert

    (@coryshubert)

    But this is NOT what happened to me… I did the WP version update as I always do when one is available. BUT, in doing the update, some of my template files and the main CSS file were reverted to their original state and this is what worries and pisses me off. Never before has hitting the WP version update button ever done anything to my template files, only the WP master files.

    I am using the template Twenty Ten just like the poster above mentions, and this is what is odd/wrong.

    My next thing is to contact the creator of the template to see how/why this could happen with a basic WP update.

    Thread Starter coryshubert

    (@coryshubert)

    Let me say again…. I did NOT update the Twenty Ten template. I never update the templates after I have worked on them because of this exact thing… updating the template you chose would throw away the work you did on it.

    I DID update the WP version from 3.0.1 to 3.0.2 and in that update, it somehow trashed my CSS file update/changes as well as changes I made to the footer.php and header.php files through the Editor functions built into WP… that is what has be in a mess.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    πŸ³οΈβ€πŸŒˆ Advisor and Activist

    What theme were you updating? You do understand that changes in the WordPress Editor are changes to the theme’s template files, right?

    Right again! Dream Host did the update and saved my butt by saving the old settings so we can revert, copy the settings and install again properly.

    Thanks very much for quick responses.

    Thread Starter coryshubert

    (@coryshubert)

    Hi ipstenu,

    I have about 9 websites that I have designed in WP in the last 5 years, so while I am not some big time WP developer, I do know the basics and how to work in WP.

    My MO is to setup an account (I use BlueHost.com) with WP installed. Then I have them create a temp url so I can work on the site before porting the dns servers over since most of my work is on websites that already exist and don’t want the site I am working on to be seen until it is ready…

    Ok, so that is my background. Now, what I did, which is what I always do, is take a free template from out on the web, install it in WP, then begin to change that so I don’t have to start from scratch. This is what I did for this client and I used the Twenty Ten template. I do things like change the colors/fonts/size and hide other things that the client doesn’t want. In this case, I also added some rotating images that lived in a folder I created in the images directory that WP uses when you upload files. Then I adde a php rotate file in the same folder as the images and added the call in the header.php file so the images will rotate for each refresh, pretty basic stuff.

    So, last night I saw when I was in the Dashboard of this project that WP 3.0.2 was out and asked me to update, so, as I always do, I hit the update and watched it go through its motions. I NEVER for a sec worried about the Twenty Ten template becasue I was not updating it… but when I went and refreshed my preview page of the site I was working on, blam, all the stuff I had added was gone, back to the default including missing pics from the banner.

    So, my confusion here is that I always do the WP update and have NEVER, NEVER had that update do anything to the template I was using or any of the code changes I have made, never once.

    If someone can explain how this could be, I am all ears.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    πŸ³οΈβ€πŸŒˆ Advisor and Activist

    This is what I did for this client and I used the Twenty Ten template.

    Right there. THAT’S what you did. The Twenty Ten template is what you were editing.

    Remember the old Default theme, and how WordPress always overwrite it when you updated? Well, Twenty-Ten is the new default, so the same thing applies.

    Thread Starter coryshubert

    (@coryshubert)

    OMG, is that the case? I had no idea that WP was using that as the new default… holy crap. I have never used Twenty Ten before so I didn’t even think of that.

    Well, lesson there, I guess I have to worry about the template I use and make sure in the future NOT to ever use the default template, and to check to make sure that I know what WP is using as their default.

    I guess I can go back and see if my host has any backup file setup that I can pull from, otherwise it is another few hours of wasted time to redo things.

    Thanks for clearing this up as it was driving me crazy to think that WP could overwrite another themes files… DOH, I am such an idiot.

    c

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    πŸ³οΈβ€πŸŒˆ Advisor and Activist

    S’okay.

    There’s a FAR better fix to this going forward. Learn how to make Child Themes. Seriously, it’s dead easy (make a folder and a .css and then copy over ONLY the template files you wanna change and edit THOSE). It will ALWAYS protect you from updates.

    The edits you make from the WordPress backend editor are literally editing the PHP and CSS template files in wp-content/themes/THEMENAME. That’s just how they work, and there’s no way around it. In general, this is a bad idea, because if the theme gets updated for any reason (remember, you can update themes via the WordPress Backend? someone will do this and shoot themselves in the foot!), you will lose ALL your changes. I strongly urge you to learn how to do child themes. It’s easy, it’s quick, and you protect YOUR changes from any update.

    Thread Starter coryshubert

    (@coryshubert)

    Yes, I see that now. I promise to be a better WP advocate from now on and I will go ahead and use the child theme approach on this and all future website gigs.

    c

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    πŸ³οΈβ€πŸŒˆ Advisor and Activist

    Mostly that was for the next guy who reads this and wants to know why πŸ˜‰

    Thread Starter coryshubert

    (@coryshubert)

    So, another question while you are here… does the new child CSS file show up in the WP editor sidebar along with all the others, or in the drop down above them, or do you just have to do your editing in another app outside of WP?

    c

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘3.0.2 update wiped out style changes in my template CSS file’ is closed to new replies.