Category Archives: Blogs

About blogs and things related to them.

Strange issue with site – DNS may be..

We shifted servers a few days back, but we seem to have some interesting problems. Right now, I see a two different versions of this blog in Firefox and Safari. Both point to same IP. Safari shows old version, Firefox shows new version.

Puzzled!

two-sites-same-domain

Solved it!

This took much longer to figure out, but it was a very interesting catch! Here are some notes.

  • We were checking the site from same network, same internet connection, same DNS servers. Firefox and Safari on my machine showed different versions of the blog.
  • Cleared browser cache – did not work.
  • Checked DNS – no problem. Everything was pointing to the new server correctly. This ruled out the possibility of DNS cache causing the problem.
  • Removed all site content from the old server and put up a blank index page. Interestingly, that did not show up. We continued to see the site. This confirmed that it is not really a DNS cache problem.
  • Checked Apache access logs – all requests were going through the new server. But still showing different designs.
  • We started thinking where else could the cache be? Now that the problem is on the server.
  • And Eureka! WordPress Super Cache was the culprit. I did clear the cache after setting up new design – as I suspected it first – but somehow the cache was not cleared. I should have manually deleted all cache files, rather than relying on the plugin to do it.
  • Deleted all WP Super Cache files and folders and everything started working!

Thanks to everyone who helped. Sujeet reported the problem first, Akshay suggested a solution, Aamod commented on the design, Kunal reported a problem with comment posting and Alan from my systems team found the real cause. I am touched by your support.

And what more? R. Bhavesh even offered to redesign the template! Thank you!

How to market your blog?

So you’ve got a blog. How do you market it? How do you get people to subscribe to that RSS feed you have? How do you keep them coming back?

I looked around the web and found some blogs that give tips and techniques for marketing your blog. Here’s are a few links:

How do you promote your blog? Or do you?

I never consciously marketed my blog, but I think I could use some of the tips in links above ;-)

How I stopped spam comments on my blog, and how you can too

I have a hard time managing comments on my blog! There are a few popular posts, and I keep getting hundreds of spam comments everyday. Interestingly the blog features in top 5 results if you search for entrepreneur on Google.

I have used many anti spam strategies over the years. I used to manage comments by moderating them all when I started in August 2005. When that became too much, I opted for WP HashCash. WP HashCash puts in an encrypted key in each comment message and checks for its validity on submission. This allows browsers with JavaScript alone, leaving most of the spam bot attacks.

But somewhere the spammers got more intelligent and WP HashCash didn’t quite stop all the spam.

Tarique suggested moving to Akismet. So around September 2006 I did!

Around December 2006, Akismet couldn’t catch a lot of spam, but I lived with it. Over the last 1.5 years, Akismet stopped some 1,60,000 spam comments.

Akismet stopped a lot of spam

But then now, it was getting too much. A lot of purely spam comments were not detected by Akismet, and I had to find something else.

And I think I got the best solution to stop spam comments so far!

Math Comment Spam Protection + Simple Trackback Validation!

Essentially, the Match Comment plugin asks the users to enter sum of two digits on the comment posting form. We assume only humans can understand and answer this. Comment spam bots will not. So you get comments only from humans.

Do you know your math? Math Comment Spam Protection

The Trackback validator checks the IP/Domain of all trackbacks you get, and also the page that generated the trackback. It checks for the link to your site / post and if found, marks it as valid comment. Everything else is spam.

I have Akismet on top of it, so if there are humans submitting spam comments, Akismet will catch that.

These three plugins combined, have stopped all spam comments! I now have zero spam!

No Spam!

There will be time when bots will become more intelligent and circumvent the current system. And then I will find something else!

What are your experiences with spam comments? What do you use to protect yourself?

Girgit Firefox Add-on

Shantanu told me about a new Firefox add-on he has written a while ago. He also discussed it during the Mozilla Indic meet we had. It’s quite nifty, and I thought I should share it with

  1. Create an account on Mozilla if you don’t have it. Login to your account.
  2. Check Show Sandbox in Profile and Save.
  3. Click on Sandbox on upper left.
  4. Search for “girgit”. You will get this page.
  5. Install!
  6. If you want to checkout the source code, follow the “View the source” link on the page.

Try it out!

WPG2 Plugin, TinyMCE Javascript problem

I have WordPress 2, Gallery 2, and the WPG2 plugin to insert Gallery photos in WordPress.

And I am bugged by a problem with this setup for a long time!

window.opener.document.forms[g2ic_form] has no properties
insertImage (form#something.JPG.hidden_form g2image.php)
onclick(click clientX=0, clientY=0)
insertAtCursor(window.opener.document.forms[g2ic_form].elements[g2ic_field],im...
Happens in functions.js (line 133)

The only link that comes up when I search for “window.opener.document.forms[g2ic_form] has no properties” on Google is a forum post on WPG2 site. The post does talk about the same problem, gives a few alternates to solve the problem, but no final solution.

I figured out the pattern in the problem. Here’s what happens:

  • You go to write a new post. Write something, and click on the WPG2 icon in the visual editor to bring up the Gallery 2 Image Chooser.
  • If you select an image from the root of your gallery, it will insert well into the post.
  • If you navigate into any albums / sub-albums, and then select an image, it will not insert into the post, and you will get the annoying JavaScript error. Non techies may not even realize there is a JavaScript error, and will just get confused why the image does not insert.
  • If you close the Image Chooser window, come back to the post, and click on the WPG2 icon again, it will open the Image Chooser in the place you left it – the same album / sub-album that you were last on.
  • If you now click on an image, it will insert in the post without errors.
  • My theory is that the Image Chooser is not able to (somehow) retain the window.opener over page refreshes. When you navigate inside albums, the Image Chooser page is refreshed. At this time, it just forgets who opened it. And throws out the error. When you reopen it, it does know which window opened it, and can insert the image well.

Hope this helps some worried souls!