Sep 8

A few days ago, I noticed that some links in my blog posts were not clickable, or at least were only part-clickable. These were all near the right margin of the content column next to the sidebar on the right. Here’s an illustration of what was happening:

Clickable1 Clickable2

As I moved the cursor from left to right over the link Life Rocks 2.0, it would change from clickable (as indicated by the hand symbol in the top panel above) to unclickable (as indicated by the arrow in the lower panel above). Because it was near the right margin of the content column and next to the sidebar, I guessed the problem was something to do with the sidebar margin. Unfortunately, I have very little knowledge of css and php and most of what I’ve learned so far in tweaking a free WordPress theme has been through good old trial and error – keep messing around until you get the desired result. I figured that there must be an overlap of the sidebar left margin onto the content column and this was affecting links near the right margin of the content column. Perhaps someone will put me right here.

Unlike previous tweaking, I got a result pretty much straight off. This is what I did. I opened the theme’s style.css file and tried changing the width of the content-wrapper and sidebar-wrapper until things worked.

Here’s the relevant section of code before:

#content-wrapper
{
width: 60%;
float: left;
}
#content
{
float: left;
padding: 0 0 10px 30px;
}
#sidebar-wrapper
{
width: 35%;
float: right;
}
#sidebar
{
float: right;
padding: 0px 15px 10px 10px;
width: 210px;
margin-right: 15px;
margin-top: 0px;

and I changed this to:

#content-wrapper
{
width: 70%;
float: left;
}
#content
{
float: left;
padding: 0 0 10px 30px;
}
#sidebar-wrapper
{
width: 25%;
float: right;
}
#sidebar
{
float: right;
padding: 0px 15px 10px 10px;
width: 210px;
margin-right: 15px;
margin-top: 0px;

So changing the width of the content-wrapper from 60% to 70% and changing the width of the sidebar-wrapper from 35% to 25% made all the links near the sidebar completely clickable as shown below:

Clickable3

Very satisfying when you get a quick result.

So, I’d suggest you have a quick look at any links on your blog near the right margin with the sidebar and see if they’ve been masked by the sidebar margin. It may be just a simple fix in the style.css file.

Any css experts care to comment on what’s happening here? Is there any other tweak I could have used to sort out this problem?


Aug 5

wordpress

I hadn’t experienced any problems upgrading WordPress in the past …until yesterday. Tried the automatic upgrade from version 2.8.1 to 2.8.3 and got a memory php error along the lines:

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 228968 bytes)

The upgrade then terminated without installing. Tried googling this error and came up with a reasonable suggestion to change the memory limit on line 13 of wp-settings.php to 64M from 32M. After doing this, I retried the automatic upgrade and got an error along the lines:

Fatal error: Class ‘Translations’ not found in /home1/techandl/public_html/wp-includes/l10n.php on line 407

This time the situation was more serious. If I tried to access this website or my WordPress dashboard, I got this error message on a white screen with no way to access my website. I’m sure others trying to access the website got the same greeting. Thankfully, I had run the WordPress Database Backup plugin and saved my posts to my hard drive just before attempting the upgrade so I had my content safe.

‘So what next?’ I thought. Well I tried changing the memory limit back to 32M in wp-settings.php but this didn’t work. I then googled the phrase “Class ‘Translations’ not found in” and found that quite a few others had experienced the same problem when upgrading. Tried several suggestions before concluding that the best route was probably to downgrade WordPress back to version 2.8.1. This was a little daunting because, having not experienced any problems since the initial WordPress install last year, I was a little hazy on how to proceed. There isn’t an easy downgrade route, so I had to treat the whole thing as relearning the WordPress install.

Thankfully, there’s a reasonably good tutorial on the WordPress website. I only had to go to step 8 in the tutorial to downgrade the installation. Briefly:

  1. I backed up the complete website to my hard drive in case I messed up and had to retrieve some important deleted files.
  2. I downloaded WordPress version 2.8.1 from the Release Archive, then extracted the zip file to my hard drive.
  3. I deleted all the files in the root of the /public_html directory online (not the subfolders) except for .htaccess, wp-config.php and sitemap.xml and uploaded the equivalent files from the extracted zip file.
  4. I deleted the wp-admin folder online and uploaded the complete wp-admin folder from the extracted zip.

I then tried accessing this website and thankfully everything was now okay – I could see all my posts and the plugins were still activated.

So what have I learned here? Well, I now have a complete backup of my site on my hard drive which should help in downgrading a failed WordPress upgrade in future. But I shouldn’t have to downgrade a failed upgrade. The automatic upgrade should work and if it doesn’t, there should be an easier way to restore a previous version. I do have the WordPress Automatic Upgrade plugin installed which I used until WordPress included this feature. Perhaps I’ll go back to using that but I don’t know if it works with WordPress version 2.8.

Hope this will be useful to anyone in a similar situation. Have you had any problems with the WordPress automatic upgrade? Let me know in the comments.


Dec 31
My 2009 tech targets
icon1 techandlife | icon2 Tech | icon4 December 31, 2008| icon31 Comment »

2009 Happy New Year

First, a Happy New Year to one and all! I hope you’ll eventually be able to look back on 2009 as a great year where you achieved all you set out to.

Here’s my short list of tech targets for 2009:

1. Move to Ubuntu. I currently use Windows XP and although the signs are that Windows 7 is going to be an excellent OS, I believe that Linux, particularly Ubuntu, is finally becoming a real alternative for us all. I’ve already installed Ubuntu 8.10 without problems and now have to find the best Linux alternatives to my essential Windows applications. If anyone is interested, I’ve listed these Windows apps on my About page. If you haven’t tried Linux but want to give it a go, I hope you’ll follow me through 2009 as I overcome all the hurdles in making Ubuntu my main OS. I hope we’ll all learn along the way.

2. Improve this website. I’ve thoroughly enjoyed starting out with WordPress and I want to become more proficient with it in 2009. I have a few ideas including trying new themes and plugins and I’ve recently installed a Contact page on this site. If anyone has any thoughts on how I could improve this site, please drop a comment below. I can take any criticism!

3. Build my @techandlife Twitter community. I’ve really enjoyed my 3 months with Twitter and it has undoubtedly helped drive traffic to my blog. I’m looking forward to building my community on Twitter. My next blog post will be about what I’ve learned so far with Twitter.

4. Build my business Twitter community. Spurred on by the success of @techandlife on Twitter, I want to use what I’ve learned so far to integrate Twitter with my small business. I believe Twitter is going to be really important in 2009 in driving traffic, so I must start to build my business presence with it.

Well that’s my main targets. What do you hope to achieve in 2009? Drop a comment below.


` `