Archives For June 2010

Just a real real quickie related to WordPress here, not Magento. If you find adding comments in wordpress causes a blank page – try disabling akismet. If that fixes it, it probably means the domain you were using to test with in the comments field has been marked as spam by Akismet. WordPress serves up the blank page as a feature to prevent spam bots. No errors were logged though, so it made it a bit tricky to figure out what’s going on.

There are loads of other people with this problem, or variations of it online – googling around there semeed to be a lot of confusion – my sugegstion is to try disabling akismet first.

Other possible causes though I found and tried before getting to Akismet: Old theme with incorrect comment form on a newer version of wordpress – compare it to the default theme for your version of wordpress. Caching – try disabling your cache if you use one.

Hope that saves someone some time. Magento content coming soon, promise…

I know this isn’t strictly Magento development related, so I’ll apologize in advance to those of you uninterested in this post, I’ll keep it brief, promise. I just wanted to tell a little story about an ill-fated ecommerce transaction with Tosh Computers, so hopefully I can save others a great deal of hassle if they stumble upon this post when looking for a review of Tosh Computers. Perhaps we’ll all learn a little something about selling on the internet too, that is why we’re here, after all.

Tosh Computers ( is a merchant of Apple Mac laptops and desktops in NZ and Australia. I ordered a top-spec iMac 27′ from them on behalf of someone who needed one for business. Being such a Mac-convert I jumped at the opportunity to help someone into one, the less Windows PC’s in the world, the better it is, as far as I’m concerned!

Continue Reading…

I’ve had a chance to make a couple of improvements to my SMTP Pro email extension for Magento. Both changes are not exactly life altering, one adds extra error detection to the self-test, and the other fixes a header problem with the self-test (reported by Phil). More details follow about the changes, if you want to get the extension, download SMTP Pro on Magento Connect. (Updated: finally on Magento Connect!)

I now send a real live contact form message as part of the testing – and ensure that when the email sends, my extension code is actually being called. I’ve had a lot of people reporting problems with emails not sending lately, only to find it’s because some other extension is interfering with my email sending. This tweak to the self test will help identify those issues.

This is implemented as a static variable on the self test controller, that is set before sending the test email and then altered by the email observer (if it is called as expected):

// Now we test that the actual core overrides are occuring as expected.
// We trigger the password forgot email, as though a user had done so.
self::$CONTACTFORM_SENT = false;
// If everything worked as expected, the observer will have set this value to true.
if (self::$CONTACTFORM_SENT) {
	$msg = $msg . "<br/> Contact Form test email used SMTPPro to send correctly.";
} else {
	$success = false;
	$msg = $msg . "<br/> Contact Form test email did not use SMTPPro to send.";

and the code in the observer that alters this variable:

// For the self test, if we're sending the contact form notify the self test class
if($event->getTemplate() == "contacts_email_email_template") {
        include_once "app/code/community/Aschroder/SMTPPro/controllers/IndexController.php";
        Aschroder_SMTPPro_IndexController::$CONTACTFORM_SENT = true;

The other change was trivial, adding a ->setFrom() call when sending the test email. Thanks to Phil for pointing that out.

Lastly, Eric requested a useful feature which I will add, but I haven’t had time to put that in to this release, next time!

Let me know any feedback you have on the changes, or if you’re having trouble sending emails in Magento – feedback welcome.

Just a quick note about several things, not really a full post. I’ve got a few cool Magento development projects on the go at the moment, blog posts are on the way. I’ve started contributing over at MageBase and I think the comment system here is sometimes broken, but I need some of your help fixing it.

I wrote up a little article over at to help you spot Magento stores in the wild. I thought it’d be a good opportunity to promote MageBase – it’s a growing community of Magento developers started by a few members of the Auckland Magento User Group.

Check it out. Feedback, article ideas and harsh criticism welcome.

Magento Development

In other news, I’m not dead, but close I got quite sick last week and have been now trying to catch up on a lot of things. I promise I’ll write some fascinating blog articles shortly – some of the exciting things I have been working on:

  • Auto responders that will follow up with a customer based on what they purchased a product-specific number of days later – for example an email that says “Time for the 3-6 month widget?” 3 months after someone buys a 0-3 month size widget.
  • The ability to automatically import a Google Docs spreadsheet and as store inventory, products and categories, allowing inventory management entirely outside of Magento.
  • An offsite cloud backup and restore extension that will give your store’s highly redundant data storage in a secure offsite facility.


One last thing, if you have been getting the blank page of death after posting comments on my blog I am so sorry. Thanks to Greg from Nexcess for pointing that out. I’m having trouble replicating it, please contact me if it happens to you so I can figure out why. This is also an excellent opportunity to tell you about one of my favorite Firefox extensions: Lazarus. It recovers lost form data when shitty websites lose your information (like my blog is apparently doing to some people posting comments). I can’t tell you how many times it has saved the day for me.