Now this is “Blog-Worthy”

Sometimes it is the simple things in life that can give the most pleasure! I have been using WordPress for years now. I just looked at the archives and it appears the first post was October 30, 2005. However since in that entry I wrote about adding an RSS feed to the blog I have to believe there were a few earlier posts also, they must have been lost. I vaguely remember a great crash that took out the blog at one point early on so unless they are cached somewhere on the web, they are gone forever. But that is not what this was about. . . I digress.

Ah yes, simple things and pleasure, now I remember.

Ah yes, simple things and pleasure, now I remember. During the last five years of using WordPress I have gone through many core upgrades. (Replacing the WordPress code on the server with updated code.) The early ones were stressful, delete these files, add these files, change the text in some files, update everything and hope to heck it works when you are done. The early loss mentioned above was traumatic, but since it was very early on in the life of the blog it wasn’t enough to where I would say “To hell with it, I am not going to try and recreate all that”… plus it was early on in the life of the blog and I was full of spirit yet. Then the WordPress team cam came along with “Automatic” updates where all you had to do was press a button and TA-DA, the script ran and the core, plug-in etc. was updated without the user having to do anything… other than push that button that is. ‘cept… there is always a ‘cept or “But” you know… always. For me and my WordPress it seemed to never work. On a rare occasion a plug-in would actually update when I pushed the button, but that was rare, very rare. So for several years I developed a routine.
A) Go to Admin panel
B) See there are updates available for a plug-in, (and yes back “in the day” you were not notified when there were updates, you just sort of checked frequently to see there there were any issued.)
C) click on the “Automatic Upgrade” button.
D) Watch the program automatically download the Zip file containing the upgrade
E) Watch as it quit doing anything useful and sit there until I lost patience and shut down the web page.
F) Go to the plug-in page on WordPress.org using the link in the blog plugin page.
G) Manually download the plug-in
H) Create a new directory on local drive
I) Unzip the plug-in to the new directory
J) Open an FTP session
K) Turn off the plug in in WordPress control panel
L) Delete the plug-in directory on the server
M) Copy the new plug-in directory to the server
N) Go back to the WordPress control panel and activate the plug-in
O) Hope it did not crash the system.
P) Repeat C through O for each of the new updates

This week I decided to take the risk and stress to update to the latest version of WordPress 3.0.1. So as always I clicked on the automatic upgrade button, and low and behold but what do you think happened? Of course, it crashed the system. Okay, reset everything, go through the manual install… following steps A through P above. The actual program update went pretty well, but then I got to the plugins and restarting them. Boom – the “500” error. Okay, deactivate all the plug-ins by renaming all of them. Now restart WordPress, now rename all the plug-ins back again. Now re-activate them one at a time until the “500” error comes back. Mark down that plug-in in, rename it, then go on to the next one…. one after the other after the other. VERY time consuming.

After I got everything working again, minus a few of the plug-ins that were causing the 500 error where the author has not updated the plug-in yet, I took a break from everything WordPress. Not upset, just “Head clearing time”.

As I did other things I thought, “I am not going to keep doing this for the next X number of years!”. So I started searching the WordPress forums for an answer. The first observation is that MANY people have this issue. So the automatic upgrading in not all that automatic for many people. The next observation is that the 1 & 1 hosting service seems to be a big offender. Now for observation one, I know from other issues most people write when they have a problem, not when things go right, so it always looks like everyone is having a problem.. same with computer or other hardware issues…. As for observation two, well 1 & 1 is a large hosting service so they probably do have a lot of people with the same issue. Also since it is large trying to get them to change something to make it work for a certain group of users (WordPress) may not be that easy so the people with problems just multiplies.

Then I started finding different “fixes” for the issue. From cross your fingers and pray, to “it isn’t hard to do a manual upgrade, so just do it”, to “I did a complete reinstall of WordPress and it .. nope, didn’t fix it!

Then I noticed a number of threads with the same basic fix, a few lines of code/text to put into the “.htaccess” file, which I also found out stands for “HyperTextAccess” a small routine which the host server reads when it looks at the directory which contains it. (or it could be in the root directory and pointing to the WordPress directory…)

There were actually a couple different entries suggested, but the one that seemed to help most people was a very simple two lines of text:

AddType x-mapp-php5 .php
AddHandler x-mapp-php5 .php

I decided it was worth a try, and really it can’t hurt since the .htaccess file can just be deleted if something goes wrong. (If you do this, you may want to save a copy of the original just to be safe.)
I opened up the .htaccess file in Notepad (or any ascii/text editor) and typed in those two little lines, copied the file back to the WordPress root directory and fired up the browser!

In the WP Control panel there were two themes which it was saying there were updates for. (A new feature in 3.01?) I had tried the automatic update before, and it did the usual “Downloading XXXX.zip” and then complete stop……………….
I went back to the same place and clicked on the update button… Well, what do you know… it downloaded those suckers in a few seconds, installed them and told me everything was okay in a matter of a few seconds! I went out to the web page and back to the control panel just to make sure I did not get a 500 error or “System in maintenance” error, and everything seems to now be working perfectly! Now I can hardly wait for a few plugin updates to come out so I can try it on them…. Maybe, just maybe even the full core code update will work next time!

Apparently the two lines of code above tell the server to use PHP version 5 which is what works with WordPress. I don’t know the technical detail even though I read about it on the web, and I don’t know that I care. I do know it seems to have fixed my problem and that is what I do care about.

Enjoy,
George

Creating the Kazology Blogroll – Part 1

The Kazology Blog uses Word Press, no surprise there. What makes it fun is the amount of customization even a “non-programmer” like me can do to make it a personal thing.
You can get thousands of themes, and thousands of various plugins to modify the basic installation of WP. Even better are “Widgets” which are an even simpler version of a plugin. You only have to know how to:

  • Copy a file from the web to a directory on your server or home computer
  • Unzip the file
  • Move it to the proper directory in the Word Press install on the host server.
  • Access the WP Admin Control Panel to activate the plugin / Widget
  • Access the WP Admin Control Panel configure settings, if any

How simple is that!

I enjoy trying out new plugins, although sometime with nasty results. To be fair, normally all you have to do is delete the offending plugin from the Host Server and you are back in business. Even then I did manage to lock myself completely once. Guess what? Another plugin to the rescue. (Maybe not technically a plug in, but PHP file, but you use it just like a plugin.)

So where the heck is all this going – to my latest project – The BlogRoll page. It seems everyone posts a list of links to other blogs/websites they like, but it seems the normal default is just that, a list of links. Boring, unordered list like “Georges Web Site”, “A Cool Web Site”, “A boring Web Site”, “Aardvarks Are Us” to “Zebra’s need a home too”.

I didn’t like that list.

I didn’t like that list. So a search began. While there are a number of plugins out there that do this the one I found was “Zo’C’s Powerblogroll“. I downloaded and installed. Oops… had some trouble here. It is not a widget, so requires some knowledge of coding to put the BlogRoll where you want it. That wasn’t getting me to far. I had used another widget “Widgetize Anything” to convert a Plugin to a Widget so gave it a try. With a lot of playing around with the single line of PHP code I finally got it working! At that point I had a nice BlogRoll in the sidebar. Looked pretty good with a nice Favicon and the name showing. Not quite satisfied I thought I would add a short description to let the reader know what “Aardvarks Are Us” is all about. (in ten words or less…) That worked great also. But did make the sidebar column sort of long, okay, but sort of long. Then I starting adding a few more links to things I use in Word Press or the web page itself (some day I am going to figure out how to switch the current home page to a page in Word Press . . some day.) At this point it just wasn’t going to be practical any longer to keep the BlogRoll in the sidebar.

Creating the Kazology Blogroll – Part 2

Once I made the decision to create the BlogRoll page I needed a new “Links” page template that I could use. Some page templates come with a links page, but not the one I am using. No big deal, just use the WP Theme editor to open a few different themes until I found one that had a separate links page… how ’bout that, the default WP theme has one! A quick copy and paste into the current theme’s directory and I was good to go. Oops, you need to do a little CSS work to make a stock page work the way you want. It’s no secret I can hardly spell CSS let alone edit it. (My web page design skills are still stuck in html version .5) The creator of the plugin did give some lines of code that should be added to make the whole thing work right, so I started doing my version of “plugging and playing” – put some code in, try it on the web page, see what happens and then try again. The goal is twofold

  1. Do NOT blow up the page so bad you have to resort to extreme measure’s to get it back, and
  2. Make it work.

After awhile I did finally succeed in getting enough code in the correct places to actually make the thing work! I was successful in getting the correct code in the link page to display the links, and the style sheet updated to format the information the way I wanted . . . almost. Everything looked (to me anyway) really good, nice favicons or other graphic showing, the really annoying bullets created by the original “ul” format were gone. Life is grand! But . . . always a “but” it seems like.

I really like the “Aardvarks Are Us” page, I really prefer “Tigers R Terrific”

While I really like the “Aardvarks Are Us” page, I really prefer “Tigers R Terrific” and it was way down on the list since links are ordered alphabetically. Not only that, the foundation of Kazology lies in the Genealogy pages that caused me to begin a web page… golly, at least fifteen years ago?!? (Anyone remember Compuserve??) (Dial up connections at 14,400 baud??) (Setting the modem stop bits, parity, etc… but I digress.) So while Word Press allows the user to assign a category to each of the links there is no control over the order they are displayed in! So again, my list did not have MY favorite Category at the top, or the links within them in the order I wanted. What to do now? Searched a little more until I found “My Link Order” and “My Page Order” and “My Category Order” on the Geeky Weekly web site. Cool, now we’re cooking with solar power. Installed the plugins, activated them, and neato the pages can be rearranged in the tool bar just the way I want them! I used the Admin Control Panel and rearranged the categories and links just perfectly… so lets see what that looks like…. oops… nothing… nada…. zilch… zero… you get the idea. Seems that Powerblogroll and My Links just aren’t gonna play together nice. I resign myself to that and life goes on, although in the back of my mind I am constantly being nagged that while life is going on, it is not going on in an “orderly” manner! Well, lo and behold, I had created a post about this process and the plugins I was attempting to use and the author of “My Link Order” noticed the link back to his web page. He apparently read the entry where I lamented over the two kids not playing nice and he commented back with just three lines of code that he said would fix this! Hot dog, we’re back in business. . . almost. More after the break!

Creating the Kazology Blogroll – Part 3

After getting the suggested changes to the PHP code courtesy of Andrew at Geeky Weekly. . . I spent a few more hours playing around editing the Powerblogroll PHP code – down in the area below the big “DO NOT EDIT BELOW THIS LINE UNLESS YOU KNOW WHAT YOU ARE DOING” remark….. (insert screen capture of the really nasty errors here – I didn’t even know my blog spoke Japanese!)

“DO NOT EDIT BELOW THIS LINE UNLESS YOU KNOW WHAT YOU ARE DOING”

Code Hacker Tip #3,298 – when editing code that you have no idea what will happen… always, and I repeat, always, keep a copy of the original code in a different directory to move back real quick when you hose everything up! (I saw an article on how to create a local copy of Word Press for experimenting on… which would be really cool, but again… I need the Ultimate Dummy directions for something like that, so all my changes go out live to see what happens being prepared to make a quick reversal if it is really bad. – get back on focus here George)
I wonder different times as I play with plugins, and reading the FAQ on the authors web site, or the “readme.txt” file with the plugin in, do they have any idea how confusing this is for many people?

Hey after all I took Fortran back in college!

While I joke about being completely illiterate, I do have some degree of familiarity with code and at least vaguely understand the principles, (Hey after all I took Fortran back in college!) but still this is difficult. So when an author documents, or replies to an already confused person trying to implement their plugin by just writing “just add < !-YouAreDense$&%20##.PHP> and it will work”, what I think they do not understand is

a) If I am having to write you for help I am obviously already confused
b) that I have no idea WHERE to add this
c) The code is maybe garbled since it was converted to HTML and back again inserting bogus characters into the “very simple statement to be added”.

I think this is no great revelation here, anyone that has never written a plugin or widget probably understands what I am talking about. So authors, please, comment your code carefully, then in your instructions show related code so we know where to put that little line… Even in one plugin you are to “change the option from false to true” to do something else… how about adding “This is easily done by removing the “remarks code” “//” from the line you want to activate and adding it to the line you wish to de-activate.” Maybe, you argue, if the user does not even have that degree of knowledge they should not be doing this… I disagree. I am willing to try, but need more hand holding to get me started. Maybe some day I will learn this and would not need to refer to a step-by-step direction, but until then help us out!

Getting to the conclusion – eventually: Taking the offered lines of code, figuring out where to replace them (another aside… drat I am never going to get to the end… the author really did do a good job of explaining, even adding the line number to be replaced. That helps, IF I am using a “real PHP code editor” that lists line numbers, but if I am using Note Pad to edit… I got no line numbers! See how this is all confusing to newbies? Anyway… I compared the suggested code to the original, figured out where it went, converted the mangled characters to the proper syntax and saved the modified version. I uploaded it, and boom, trashed web page. Oops, put back the original, check changes, save again and upload again. Success!! A great looking web page, ordered the way I want it, not how it want to. Went into the Admin Panel again, changed some links around and checked the results…ooops, nothing again. What the #$@%^! is going on. In the Admin Panel for MyLinkOrder when I selected a category to order I was getting extra entries showing. I carefully checked the listing of entries, opened each one up, verified each one had the correct category assigned and tried again… No luck. I kept playing around for a while, I finally found that I had to open each blogroll entry up, select the proper category again, even if it looked correct, save it, then tried again. Success! Only the proper links assigned to a category appeared in the “order links here” field. I set the order the way I wanted them to appear, updated, and went out to view the BlogRoll Page for the 257th time. TA-DA!! I am one happy camper now! It is a work of art, a sight to behold (or is that site to behold), cooking with gas, better ‘en sliced bread. I pwned it (honestly I have never figured that one out.) W00T W00T.

TA-DA!! I am one happy camper now! It is a work of art, a sight to behold!

Check it out!

Now… since this is so long, I think I am going to try out the “continued on page” plug in…. cross your fingers!

Until the final link opens,