I upgraded from 4.7 to 5.1 and it was a disaster. It is impossible to list all the things that went wrong. Here are just some of them: Containers having their parent category "unavailable". By this I mean I would be in the Container listing, where it shows the parent, and clicking on the parent would take me to my home page. Of course, the parent is there, and editable, just not reachable. Create a new category, modifying the original only by adding an underscore to the name, then editing the container to associate it with the newly created category results in a clicking of the category finding the category without problem. Permissions were FUBARed and things that were wonderfully accessible in 4.7 were off-limits in 5.1 (I guess that is better than the alternative). Editing or creating a node in 5.1 with any category association resulted in multiple key violations along with a mysql error when "td.nid in ()" found its way into the query (without anything in the parenthesis, the query was doomed). Diabling TAC_lite fixed the query errors but not the key violations.

I then edited all of my nodes to remove any selected categories (replaced with "none") and then I deleted all of the containers and all of the categories. Rebuilt permissions. No more key violations.

I would have thought that would be good enough. Nope. When I re-inserted a single container/category hierarchy, I still have the same irrational taxonomy access (that is, it is inconsistent with perms). I have it narrowed down to two nodes, on a single category hierarchy, with just two roles (authenitcated user and anonymous user). One is supposed to be private, the other public. So even I can't mess that up. When the perms didn't work right, I tried rebuilding perms again. That didn't help.

In any event, will just uninstalling the following two modules allow for me to either (1) reinstall and get my beloved Category modules and TAC working again or (2) use Drupal core taxonomy to effectuate my access control?

Category Access Control - lite
Category

A subquestion is whether uninstalling Category module will revert the wrapper modules of taxonomy and book to their original version, or will I have to do that manually?

I am presuming that by uninstalling Categor, the following modules go away gracefully:

Category display
Category export
Category legacy
Category menu
Category outliner
Category pathauto
Category transform
Category views

Thanks

Comments

drupal777’s picture

Status: Active » Closed (fixed)

Bdragon was kind enough to offer the following suggestion for completely removing the Category module. What follows, of course, is my understanding of what he said, so it is possible that I misunderstood one thing or another. If you attempt this and experience difficulty, please post to this issue thread and change the status from closed to open in the process.

1) First and foremost, make a complete backup of your database and your programs

2) Optional: make a smaller backup of just those tables that will be impacted by this effort. You will need these tables later if you want to restore the system to some semblance of the same state it was in before you started as far as vocabularies/terms go.

vocabulary
vocabulary_node_types
term_access
term_hierarchy
term_node
term_relation
term_synonym

3) If using 5.1, go into Administer->Content Management->Categories and uninstall both the book and the taxonomy wrappers. If you don't want to do this via the UI, or don't have 5.1 and can't find the option anywhere in the administrative menus, you can do this manually by backing up the existing book.info and book.module files from the modules/book directory and replacing them with the "old" copies that should be in the same directory (look for book.info.old and book.module.old). If they aren't there, you can get them from a new download of Drupal 5.1 in the book directory. Do the same in the taxonomy directory with taxonomy.info and taxonomy.module.

4) While this may not be necessary, it is probably a good thing to do: delete all of your categories and containers manually. This will "clean" up the database somewhat, and it will render the tables identified in step (2) as OUT OF DATE. If you made a copy of these tables in step (2), it will be a snap to restore them in step (8), below.

5) Delete the /category directory and all files in all subdirectories of the /category directory.

6) Visit admin/build/modules (or, you prefer to work with menus: administer->modules) so that the system table can be rebuilt to recognize that the category module no longer exists. This will happen automatically when you visit that location.

7) Delete/drop the following tables from the database as they are no longer needed or used:

Category
category_hierarchy
category_node
category_relation
category_synonym
category_cont
category_cont_distant
category_cont_node_types
category_export
category_views
category_display
category_legacy
category_legacy_map
category_menu
category_menu_map

8) If you want to start out with your vocabularies and terms reflective of the containers and categories you had before you started this, restore the tables that you backed up in step (2) to the database.

That should do it.

Whew!

And, I might add, it worked for me.

andyschm’s picture

This worked for me but the following additional steps were required:

1) Fix module ownership in vocabulary table:

update vocabulary set module = 'taxonomy' where module = 'category';

2) Fix "wrong" tree structure in term_hierarchy.

Apparently category_legacy maintains this table in an incompatible format. Thus, after disabling category module, vocabularies in /admin/content/taxonomy all appeared to have *no* terms! Category_legacy maintains the root nodes like this; (tid = vid, parent = 0). So category puts an entry into term_hierarchy for the vocabulary, as if it was a term. However taxonomy expects no entry for vid and parent = 0 for all top level *terms* only. The following fixes the problem:

delete from term_hierarchy where tid in (select vid from vocabulary);
update term_hierarchy set parent = 0 where parent in (select vid from vocabulary);

I don't know why my copy of category resulted in this particular structural problem with term_hierarchy, but it is now fixed and all the terms and structure created by category are now accessible to taxonomy. If your term_hierarchy does *not* have this problem, then running the above queries will have no effect. (should result in 0 rows modified).

BTW - I also skipped step #4 without any problems (deleting by hand), since I have more than 700 terms this would have taken days to do by hand. Step #7 above should also be considered not necessary, in fact those tables contain the old category <-> nid relationship which you may want to extract later.

YMMV. Make backups. ;)