Categories
Uncategorized

Destroy your website like a pro

… and then fix it like an amateur!

The Situation

I use a special software tool for the layout of this site. I’m an engineer / technician. I don’t do ‘creative’. I tried but it just isn’t me. Insiders will know what I mean. DIV and CSS… I tried all that and I know the basics. The tool produces templates that you can customize without digging too deep. I agree: everything looks the same in the end but I don’t care. This site is for content and not for looks. Let the designers be creative. I want to be productive. So I bought the software. I only paid for software twice: this tool and some DX logging software for Windows. No name dropping unless they pay me.   😉

The Problem

Like all software, the tool has bugs. I encountered one that messed up the header for this site. It occured when I set the spacing between lines to 150%. That makes reading plain text like this easier. But it had a bad effect on the header. In Firefox I could get away by telling you it was an artistic effect. It wasn’t too bad. In Explorer the header got cut in half. That looked bad. I filed a bug report on the company’s website. They promptly made an upgrade and asked me to try. But it didn’t help. Then they told me to wait until the next big release ‘somewhere this summer’. Ouch! Poor customer service.

Website total loss

I decided to try and tackle the problem. On a Friday night. Pretty late. I don’t exactly remember what I did but I must have uploaded a wrong file format to the mySQL database and it got wasted. The website was totally lost. You only got to see a blank screen with ‘Restricted Access‘. AARRGGHHH! I don’t even know how I diagnosed the database as broken. I’m not an expert on this matter. But this website makes use of a database. No database = no website. And the database was corrupt. What to do now? Delete the database on the server? That means EVERYTHING is lost. Google didn’t offer me a solution. So there was nothing left to do. I saw dark clouds forming over the XYL’s head because I stuck behind the laptop. But this is a feeling only a technician knows: if there is a problem IT HAS TO BE SOLVED. Immediately. Even if it lasts all night. I made a back up of the corrupt database (you never know) and started all over again. With a new and blank WordPress site.

Solution 1 – Dirty Fix

I made a new blank database and tried to import the corrupt database backup I just made. That worked very good because the new database had the same error. That means the import process worked but an exact copy of a bad file is a bad file too. I had a good backup from two weeks ago which I imported. That was nice but I lost a couple of posts. It was approaching midnight and the XYL’s eyes were now shooting lightning bolts because I wasted the evening. Sorry honey, but a problem HAS TO BE SOLVED. Immediately. So I made a quick posting here explaining why the latest posts were gone. And I went to bed. This dirty fix didn’t satisfy me but that’s what you get when you mess things up and don’t make a backup BEFORE you start messing up…

Solution 2 – Clean Fix

At 3.45 AM local time the hand of my subconsious shook me up. “DON’T IMPORT THE WHOLE CORRUPT DATABASE, ONLY THE TABLE WITH POSTINGS WILL DO!” Yes, that might work. The problem probably is in another table in the database so if I replace the table with the postings, I can recover the content. I jumped up and went downstairs. Sure enough: I was able to replace the table in the new database with the table from the corrupt database. All content back online!

Bonus

Like I said: I know the basics of CSS and DIV. Firebug told me just what DIV the posting was in. I added the code in the CSS by using the CSS editor in WordPress in stead of the dedicated layout tool. So I achieved what I wanted to do (distance between lines = 1.5 times normal space) and I bypassed the software’s bug.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.