WordPress being slow, a DNS problem

A friend of mine runs a WordPress site and recently moved to a different provider. The transition went smoothly and the site ran fine for three weeks. One day he made a post like he normally does and the site become very slow. He deleted the post but with no result. His site was still extremely slow, I mean it took almost a minute to load the index page. Installation of a caching plugin, deactivating all plugins, selecting the default theme did not help at all.
Read the rest of this entry »

Can’t print in evince, GEdit, Claws-Mail.

I’ve got a printer connected on my Windows machine and it’s shared so I can print from my Ubuntu Intrepid machine as well using Samba. It works pretty well. I usually only print from OpenOffice 3 but today I had to print an email (Claws mail) and it failed. I got the Printer selection box but when I clicked on print an error message popped up, “Can’t prompt for Authorization”. I checked my printer settings and everything looked fine, so I tried again, another error message popped up: “Too many failed attempts”.
After sending an email to the Claws Mail list, Colin Leroy pointed out it could be a bug in GTK as I also couldn’t print from Gedit. I did some searching on the Internet and found several reports similar to mine but no solution.
I started to do some researching on my laptop and I found a work around to solve the problem.
Read the rest of this entry »

How to create nested forms.

Update: December 6, 2015 – Fixed several bugs in the code.

Even though I write this article with the perspective on a plugin for WordPress the solution can used anywhere. The example I’ll use to explain how to create a form within a form, aka nested forms, will have no direct links to WordPress but will merely show how to create a form within a form.

For my AVH Amazon plugin I wanted to add a metabox with a form on the Post and Page pages. The purpose of the metabox was to give the user the ability to create the shortcode without having to remember, and type for that matter, all the options.

I wanted users to have the ability to look up their wishlist, show them a the items on their wishlist and give them the option to select one. The problem with this is not so much the form itself, that is pretty straight forward, but the Post and Page pages are almost completely wrapped in a form. The metabox resides with in that form and by design you can’t have a form inside a form in HTML.
It was jQuery, the awesome javascript framework, that bailed me out.

Read the rest of this entry »

Ubuntu: Shutdown problem, CIFS related

If you install Samba on a Ubuntu Gutsy box and you are using the Networkmanager for your network settings you are very likely to encounter the following error message when you shutdown:
CIFS: VFS server not responding
CIFS: No response for cmd 114 mid 3

It’s a bug in Gutsy and it looks like it’s a bug in Hardy as well but there is a work around. Read the rest of this entry »