Hi,

I just downloaded and enabled the module first time. But I got the following warnings and not sure what is wrong with them. Please let me know what would the issue here and a related fix as well.

* user warning: Table 'category' already exists query: CREATE TABLE category ( `cid` INT unsigned NOT NULL DEFAULT 0, `cnid` INT unsigned NOT NULL DEFAULT 0, `weight` TINYINT NOT NULL DEFAULT 0, `depth` TINYINT NOT NULL DEFAULT 0, PRIMARY KEY (cid), INDEX cnid (cnid), INDEX weight (weight) ) /*!40100 DEFAULT CHARACTER SET UTF8 */ in /home/paradesi/public_html/includes/database.inc on line 550.
* user warning: Table 'category_hierarchy' already exists query: CREATE TABLE category_hierarchy ( `cid` INT unsigned NOT NULL DEFAULT 0, `parent` INT unsigned NOT NULL DEFAULT 0, PRIMARY KEY (cid, parent), INDEX parent (parent) ) /*!40100 DEFAULT CHARACTER SET UTF8 */ in /home/paradesi/public_html/includes/database.inc on line 550.
* user warning: Table 'category_node' already exists query: CREATE TABLE category_node ( `nid` INT unsigned NOT NULL DEFAULT 0, `vid` INT unsigned NOT NULL DEFAULT 0, `cid` INT unsigned NOT NULL DEFAULT 0, PRIMARY KEY (cid, vid), INDEX vid (vid), INDEX nid (nid) ) /*!40100 DEFAULT CHARACTER SET UTF8 */ in /home/paradesi/public_html/includes/database.inc on line 550.
* user warning: Table 'category_relation' already exists query: CREATE TABLE category_relation ( `crid` INT NOT NULL auto_increment, `cid1` INT unsigned NOT NULL DEFAULT 0, `cid2` INT unsigned NOT NULL DEFAULT 0, PRIMARY KEY (crid), UNIQUE KEY cid1_cid2 (cid1, cid2), INDEX cid2 (cid2) ) /*!40100 DEFAULT CHARACTER SET UTF8 */ in /home/paradesi/public_html/includes/database.inc on line 550.
* user warning: Table 'category_synonym' already exists query: CREATE TABLE category_synonym ( `csid` INT NOT NULL auto_increment, `cid` INT unsigned NOT NULL DEFAULT 0, `name` VARCHAR(255) NOT NULL DEFAULT '', PRIMARY KEY (csid), INDEX cid (cid), INDEX name_cid (name, cid) ) /*!40100 DEFAULT CHARACTER SET UTF8 */ in /home/paradesi/public_html/includes/database.inc on line 550.
* user warning: Table 'category_cont' already exists query: CREATE TABLE category_cont ( `cid` INT unsigned NOT NULL DEFAULT 0, `admin_title` VARCHAR(255) NOT NULL DEFAULT '', `help` VARCHAR(255) NOT NULL DEFAULT '', `module` VARCHAR(255) NOT NULL DEFAULT '', `relations` TINYINT unsigned NOT NULL DEFAULT 0, `synonyms` TINYINT unsigned NOT NULL DEFAULT 0, `hierarchy` TINYINT unsigned NOT NULL DEFAULT 0, `multiple` TINYINT unsigned NOT NULL DEFAULT 0, `required` TINYINT unsigned NOT NULL DEFAULT 0, `tags` TINYINT unsigned NOT NULL DEFAULT 0, `default_category_type` VARCHAR(32) NOT NULL DEFAULT 'category', `hidden_cont` TINYINT unsigned NOT NULL DEFAULT 0, `allowed_parent` INT unsigned NOT NULL DEFAULT 0, PRIMARY KEY (cid), INDEX admin_title (admin_title), INDEX allowed_parent (allowed_parent) ) /*!40100 DEFAULT CHARACTER SET UTF8 */ in /home/paradesi/public_html/includes/database.inc on line 550.
* user warning: Table 'category_cont_node_types' already exists query: CREATE TABLE category_cont_node_types ( `cid` INT unsigned NOT NULL DEFAULT 0, `type` VARCHAR(32) NOT NULL DEFAULT '', PRIMARY KEY (cid, type), INDEX cid (cid) ) /*!40100 DEFAULT CHARACTER SET UTF8 */ in /home/paradesi/public_html/includes/database.inc on line 550.
* user warning: Table 'category_menu' already exists query: CREATE TABLE category_menu ( `cid` INT unsigned NOT NULL DEFAULT 0, `links_for_cats` TINYINT unsigned NOT NULL DEFAULT 0, `expanded_for_cats` TINYINT unsigned NOT NULL DEFAULT 0, `plid_for_container` INT unsigned NOT NULL DEFAULT 0, `menu_name` VARCHAR(32) NOT NULL DEFAULT '', PRIMARY KEY (cid) ) /*!40100 DEFAULT CHARACTER SET UTF8 */ in /home/paradesi/public_html/includes/database.inc on line 550.
* user warning: Table 'category_menu_map' already exists query: CREATE TABLE category_menu_map ( `mlid` INT unsigned NOT NULL DEFAULT 0, `nid` INT unsigned NOT NULL DEFAULT 0, PRIMARY KEY (mlid), UNIQUE KEY nid (nid) ) /*!40100 DEFAULT CHARACTER SET UTF8 */ in /home/paradesi/public_html/includes/database.inc on line 550.
* user warning: Table 'category_display' already exists query: CREATE TABLE category_display ( `cid` INT unsigned NOT NULL DEFAULT 0, `navlinks` TINYINT unsigned NOT NULL DEFAULT 0, `toc_for_cats` TINYINT unsigned NOT NULL DEFAULT 0, `toc_depth` SMALLINT NOT NULL DEFAULT 0, `toc_nodecount` TINYINT unsigned NOT NULL DEFAULT 0, `nodelinks` TINYINT unsigned NOT NULL DEFAULT 0, `show_listing` TINYINT unsigned NOT NULL DEFAULT 0, `emptymsg` TINYINT unsigned NOT NULL DEFAULT 0, `legacy_redirect` TINYINT unsigned NOT NULL DEFAULT 0, PRIMARY KEY (cid) ) /*!40100 DEFAULT CHARACTER SET UTF8 */ in /home/paradesi/public_html/includes/database.inc on line 550.
* user warning: Table 'category_views' already exists query: CREATE TABLE category_views ( `cid` INT unsigned NOT NULL DEFAULT 0, `view_for_cats` VARCHAR(32) NOT NULL DEFAULT '0', `view_for_cont` VARCHAR(32) NOT NULL DEFAULT '0', PRIMARY KEY (cid) ) /*!40100 DEFAULT CHARACTER SET UTF8 */ in /home/paradesi/public_html/includes/database.inc on line 550.
-----------------------
Green Status:
-----------------------

* The Category module was successfully installed. To use the new features properly with other modules depending on Book and/or Taxonomy, you should install Taxonomy and/or Book wrappers prior to enabling such modules. Beware that wrappers are significantly changing the way how books and taxonomies work.
* The configuration options have been saved.

--------------------
Yellow Status:
--------------------

* Your site already have some taxonomy data, needing to be converted using the category_legacy module (after the corresponding wrapper(s) have been installed), to become compatible with the newly installed Category system.
* There are updates available for one or more of your modules or themes. To ensure the proper functioning of your site, you should update as soon as possible. See the available updates page for more information.

thanks,
~Paradesi

Comments

JirkaRybka’s picture

Seems like Category module was already present on the site, in the past, because the tables are already there. It was probably some older version (as the new cache table is not listed [didn't collide with a pre-existing one], and you're prompted for updates).

You might be able to proceed with update.php [with a harmless warning about the cache table], as long as direct upgrades from that old version are working, but I'm afraid that the old category tables might contain some outdated information.

So, the safest way would be to revert to a backup (restore database from a copy that you hopefully did before the attempt), then delete the old category tables via PhpMyAdmin [or similar], and install Category module to this cleaned environment. You might be still prompted about updates, but don't run them on a new install in this case - just visit update.php, and select manually a version under Category module that says "no updates available" to get the update system in sync with the newly installed version.

The same should be doable by un-installing Category (and then installing/enabling again), but I'm not really sure if there are further consequences. Maybe it's worth a try, but only after a backup-copy of the site's database and code are saved.

This is just an untested guess, and dangerous operations in general, so be careful, and take another backup copy before trying!