Tag Archives: checkout

Jigoshop and Headway Themes checkout frozen, waiting indicator keeps spinning.

Recently our Jigoshop checkout page stopped working. When our customers would try to complete the checkout process they would get a waiting indicator that would force them to wait forever to checkout.

Our system had the following software versions

  • Jigoshop 1.2.3
  • WordPress 3.4.1
  • PHP 5.3.10
  • Headway Themes 3.2

After a long conversation with Jigoshop support we investigated this problem ourselves. It turns out that the ajax admin handler that processes checkout requests for Jigoshop calls ob_clean() before returning a response. We found out that the call to ob_clean() was causing php to hang indefinitely. As a result request made to the jigoshop checkout ajax handler were not being returned. For some reason this error was not being reported in the php.log file.

Further investigation revealed that source of the issue was the fact that Headway Themes was initializing the output buffer using a call to ob_start with ‘ob_gzhandler’, passed as a parameter. Unfortunately our php was not configured to use zlib library for output compression, which is what this call specifies. Output compression is controlled using the zlib.output_compression setting in the php.in file. To enable output compression we would have to set zlib.output_compression=On, the default is Off. In our installation we are not able to control the php.ini file, fortunately we are able to override this Headway Themes setting using the headway_gzip filter. We added the following code to the functions.php file for our headway child theme.

// functions.php
function atlas_noBuffer() {
return false;
}
add_filter(‘headway_gzip’,'atlas_noBuffer’);

This seamlessly resolved the issue for us.

Resources: