Wp Auto Upgrade, not good for big plugins.

I am so glad that wp 2.5.1 has the ability to automatically upgrade plugins because it saves a lot of time and is very neat and tidy. Unfortunately, some of the bigger plugins like cforms or wp-shopping cart tend to mess up if auto-upgraded.

By bigger and big I mean complicated, multi folder/directory plugins with lots of data and whathaveyou.
With the WP-Shopping cart the auto upgrade ended up costing me a day’s labor.
I lost all my product page thumbnail images. How? I don’t know since the uploaded images for products aren’t in the Plugin folder but in the Uploads folder. Therefore they couldn’t have gotten over written. But the linkage to them was messed up.
Although, given the history of wonkiness this plugin has had this might have happened anyway even if I had uploaded the latest version manually…

Mainly, the largest problem for the auto upgrader is this plugin comes in an extra folder “wp-ecommerce”. The folder you want uploaded is “wp-shopping-cart”. WP’s plugin auto upgrader can’t read the readme.txt which of course says do not upload the wp-ecommerce folder, just the wp-shopping-cart folder. So after an auto upgrade the E-Commerce tab in your admin dashboard is there but your products and the shopping cart,widgets and all are not on your site. Your purchase log is gone and there are permalinks leading places that seem not to exist.Before you freak out and lose your cool, don’t get too scared: everything is still in your database.But you will probably have to redo all your product images.The latest version is so much better so don’t let this stop you from upgrading.

Things new to the latest version are:
A Latest Products widget which shows product thumbnails in your sidebar and is invaluable.

Permalinks!
I never thought they’d give us permalinks, did you? Now the plugin is miles closer to SEO. If only there weren’t a tables layout and a load of < br > s that aren’t closed…
The ability to edit the Category link which shows in the sidebar to whatever you want it to say.The Categories list is no longer called Categories but “Product Groups” and so the widget is no longer called “Products and Brands” but Product Groups. This is one of the better improvements. I can well put up with a days work to have a better functioning free shopping cart,can’t you?

Fixing product images:

You may not have this problem but I did: Product thumbnails not getting displayed in the product pages or in the Latest Product widget.
I found that uploading a seperate thumbnail when editing a product solved the issue of the missing pic in the products page but I had to view the source of the sidebar widget to see why my thumbs weren’t being displayed there. It was just a matter of uploading a new thumb via FTP to the uploads/wpsc/thumbnail folder with the same name as was described in the link in the source…
I haven’t got a clue as to why the newest version of this amazing plugin does this with product images. The good news is that it is fixable.
With cforms from deliciousdays I lost my forms because the upgrade didn’t actually upgrade. I’m not sure what it did but the results were I had to do it myself and then redo my forms. Now I am wiser and have backed up my forms. Most likely what happened was some kind of time out during the FTP process that caused things to go awry.

Any time one upgrades one should take care to save a copy of the old version if they have made any code edits. Oftentimes it’s hard to keep track especially if you run a lot of plugins.The auto upgrade function can’t save your carefully thought out edits. But then, if you are the kind of WordPress user that makes carefully thought out code edits you don’t need me to tell you this as you are very clever and need no hand-holding and are probably writing a plugin as I write this..

Beefy SEO Title Tags for WordPress Header.php

WordPress title tags in your theme’s header.php may not be the SEO ideal.
Try this instead:

[php]<title><?php

// Page or Single Post
if ( is_page() or is_single() ) {
the_title();

// Category Archive
} elseif ( is_category() ) {
printf( __(‘Archive for &lsquo;%s&rsquo;’), single_cat_title(”, false) );

// Tag Archive
} elseif ( function_exists(‘is_tag’) and function_exists(‘single_tag_title’) and is_tag() ) {
printf( __(‘Tag Archive for &lsquo;%s&rsquo;’), single_tag_title(”, false) );

// General Archive
} elseif ( is_archive() ) {
printf( __(‘%s Archive’), wp_title(”, false) );

// Search Results
} elseif ( is_search() ) {
printf( __(‘Search Results for &lsquo;%s&rsquo;’), get_query_var(‘s’) );
}

// Insert separator for the titles above
if ( !is_home() and !is_404() ) {
_e(‘ at ‘);
}

// Finally the blog name
bloginfo(‘name’);

?></title>[/php]

WordPress 2.5 gallery needs work.

First let me say that I’m not knocking WordPress.
Here are some failings of the new gallery for WordPress 2.5.
The new function is terrific but it needs some work.
This is what I have found so far.

Style tags are inserted by the gallery shortcode into the post or page itself.This is very much not allowed, pages and posts with gallery shortcode will not validate because of this.
Clicking on archives in the sidebar or where ever you put your archives will show the gallery css as the excerpt of the post with a gallery in it, as well as the captions for each image.
The detailed list html is incorrectly nested in the post or page, post or page fails validation.
Alt text only gets inserted on single images.the gallery shortcode skips this, page/post fails validation.

Viewing source reveals this hidden comment:
See gallery_shortcode() in wp-includes/media.php.
Are we to check this file out so that we can see if we re-code ourselves? Fat chance!
Good news, there is a plugin to fix this.
Check the forums for updates on this issue and the plugin.

How to use the gallery in WP 2.5

2 posts ago I sort of skimmed this topic and while I got just one response I figured my post was vague enough for a do over.

That post wasn’t intended to be a How-To post but more of a heads up. I had not found any reasonable documentation of how to use image.php,myself. Matt Mullenweg showed us how to use the uploader but didn’t mention image.php. But I did find out that it is very easy to use. Easy is your good friend.
So if you are confused about how it works and what the heck image.php does and how it all comes together to show a gallery similar to Matt’s. I think I can help some people and confuse a few others. Just kidding.
Just a tidbit: image.php is like attachment.php.More on that later.

Caveat:Matt’s main photo page has fancy pagination- a whole other deal- and not a weapon in my arsenal, sorry.***It’s Gallery2***

My how-to will deal with image.php and how it acts to display the gallery.
Continue reading How to use the gallery in WP 2.5