WordPress Media Uploader – Another HTTP Error Solution

There are countless posts in the WordPress.org forums about errors that occur when using the media uploader.

Otto does a pretty good job of outlining the main issues and solution in this post.

In my experience these errors usually occur because of your server setup or memory issues. To help you diagnose where your problem lies:

1. If the file appears to upload and then you get an HTTP Error, this is most likely your server settings preventing you from uploading or processing large files in some way.

2. If you get as far as “Crunching…” being displayed, this is most likely a memory issue – the image is so big that the server struggles to create the other images sizes. Also note that it is often the actual physical dimensions of the image not the filesize that is too big and causes the memory issue.

MaxLen

The most recent occasion when I ran into this issue was on a 1&1 Virtual Server. None of the fixes I could find solved my issue and I eventually tracked it down to needing to increase to MaxLen setting on the server.

… 

 

WP e-Commerce Cross Sales

The latest version of WP e-Commerce (3.8.x) for WordPress is a significant move on both in terms of stability and extensibility.

This is partly down to an extensive re-build on the codebase to take advantage of some of WordPress’ latest features; custom post type and taxonomies. This has the added benefit of making it much easier for plugin developers to create add-on plugin to enhance WP e-Commerce functionality.

The key objectives now seem to be to keep WP e-Commerce ‘lean and mean’ to provide a solid platform on which to develop WordPress-based e-commerce sites, and provide additional functionality through plugins.

Part of this process includes stripping out some of the less-used parts of WP e-Commerce and turning them into plugins. Once such example is the automated ‘Also Bought’ functionality which can be found in the Marketing tab of WP e-Commerce settings.

I have worked extensively with WP e-Commerce over the last 2-3 years and frequently try to get involved wether it be fixing the odd bug or helping out on the forum – when I have time ;) so I jumped on board to help separate the ‘Also Bought’ functionality into a WordPress plugin.

… 

 

Single Column Gallery in WordPress

You may (or may not) have noticed that in WordPress if you want to insert an image gallery into your post it does not give you the option of insert a gallery only 1 column wide.

This seems like an oversight. I have seen loads of photo and inspiration blogs around that often include multiple images in a single column so it would seem that being able to easily insert a single column gallery would be a useful feature.

Fortunately it is possible to insert a gallery one column wide, just not through the popup media window. Here’s how…

… 

 

Setting a short menu name when registering a new custom post type in WordPress

When registering a new custom post type in WordPress, there are a whole array of labels you can set for how your post type will be displayed in the admin.

The post type I was creating had quite a long descriptive label which was fine in most scenarios but in the case of the main admin menu it pushed the menu text onto several lines.

See the example on the left below – I have deliberately shown any extremely long title to illustrate the point.

It would be really useful to have an extra label for ‘menu-name’ so that you can use a different title for the menu item as illustrated in the example on the right.

I have submitted a WordPress patch which Andrew Nacin seems to have taken under his wing. You can follow the progress of the patch here.

 

Using HeadSpace with Custom Post Types

I frequently install HeadSpace, the WordPress SEO plugin by John Godley, when I work on a WordPress site.

Recently I have been making use of the new custom post type features of WordPress 3.0 but found that the HeadSpace meta box for editing the title and description tags did not show on my custom post type edit screens.

After a bit of delving through the code I figured out the way to do this – note that this may only work if your custom post type uses the default post capabilities.

It checks that the HeadSpace class is available and if so adds the meta box to your custom post type edit screen. Just add the following code into your plugin or theme’s functions.php file replacing ‘myposttype’ with your custom post type.

/**
 * Add Headspace plugin support for myposttype
 */
function myposttype_headpspace_add_custom_box() {
 
	global $headspace2;
 
	if ( function_exists( 'add_meta_box' ) && is_object( $headspace2 ) ) {
		add_meta_box( 'headspacestuff', __('HeadSpace', 'headspace'), array( &$headspace2, 'metabox' ), 'myposttype', 'normal', 'high' );
	}
 
}
add_action( 'wp_print_scripts', 'myposttype_headpspace_add_custom_box' );