Long overdue, we finally decided to take the plunge and upgrade our WordPress 2.9.1 website with the WP e-Commerce plugin to the latest version. Unfortunately the upgrade for some reason broke several conditional tags in our selfmade dynamic theme.
if (is_page(107) || $post->post_parent == '107') get_sidebar('shop');
This code no longer identified the subpages to 107 and the only fix I could find was to add all the separate subpage ids in is_page tags, thankfully there are only three subpages there.
Even with the subpages' ids included, if you navigate to a product page (i.e. http://www.site.name/products-page/aloittelijalle/discover-the-classics-vol-3-the-concerto/ ) the shop sidebar condition is once again not met although it worked fine before the upgrade.
products-page is the page with id 107, aloittelijalle is a product category and discover-the-classics-vol-3-the-concerto the product.
Another broken tag is the one that checks if you're on an article page or not:
if ( is_home() || is_archive() || is_page(81) || $post->post_parent == '81')
This one still works on the archive pages when you select a certain month but if you head to the main archive page (id 81) that shows the most recent articles it no longer meets this condition for some strange reason.
The strangest thing of all is a really big bug that involves both of the previous ones. When you from the WP e-Commerce category widget click on a category (i.e. http://www.site.name/products-page/aloittelijalle/ or http://www.site.name/?wpsc_product_category=aloittelijalle depending on the permalink style), instead of getting to the list products in that category you get transported to the article page (id 81) and when you get there this way the above condition is met and the code recognizes it as the article page.
When testing further I found that when I remove the conditional tags that try to identify the article page the product category page gets loaded and not the article page, but the conditional tags that load the sidebar and page header still identify it as an article page. It looked to me like the issue could be some sort of conflict with the page id numbers so I tried making a brand new article page with a new id and changed all article-related conditional tags to look for that page instead, but the issue remained the same.
Now you'd think the WP e-Commerce plugin would be behind all the problems, but even if I disable the plugin the conditional tags that are supposed to identify article pages still won't work. It's a very strange bug and I would appreciate any advice I could get towards fixing it. I'd give you the direct links to the site, but it's currently closed to the public due to the issues caused by the upgrade. We naturally hope that we'd be able to put our site back online soon. Thank you for your time and interest!