I initially posted a part of this to #409996: Node's asscociated categories don't show up on node and category page, but now more problems with the upgrade path arised, so I see that this really need a separate issue.

I have two problems with the 5.x->6.x upgrade:

- The {category_node} table is broken, because the update function fills the vid column with nid, instead of vid. The result is total mess in categories assigned to nodes. However, the {term_node} table is correct, because core have a working update function for taxonomy. The patch uses the same query for category update too.

- The content types changed from 'category_cat' and 'category_cont' to 'category' and 'container'. Unfortunately, this change is not done on all places - the names of settings in {variable} table often contain content type names too. In particular, there's a problem with per-content-type settings - these are lost on upgrade, as the names no more match the new content types. The result is that all settings for Container and Category content types are silently reset to defaults, which might go unnoticed for a while, but may have unpleasant effects such as promoting all new forums to frontpage as empty teasers (due to content type "Category" suddenly having the default "Promote" workflow).
My patch identifies these variables, transfers the values, and cleans up the old ones in a new update function. But since there might be people already running the beta releases, I only set the variables if they are not set already (i.e. through UI, or on completely new 6.x installs).

This new patch is not fully tested yet. The query works fine (tested previously), the rest is about to be tested in a few days time. Stay tuned!

CommentFileSizeAuthor
category-upgrade.patch2.36 KBJirkaRybka

Comments

JirkaRybka’s picture

After another full upgrade of my site (testing on localhost), I confirm that this works correctly.

Remaining thing to check is why my content type descriptions [edit: for Category and Container] were not kept from 5.x, but that's rather minor and might be another issue. Certainly not a stopper for this patch.

Jaza’s picture

Status: Needs review » Fixed

Committed to HEAD. Thanks.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.