Hello there,

I'm preparing the upgrade of my website, working on a backup imported on a test site. When upgrading, I have a lot of errors, and the main wrong behaviour of the freshly upgraded website (from what I've been able to see until now) is that the content of the "Primary Links" has been replaced by the "Navigation menu" content, and it seems there's no way to recreate properly my "Primary Links".

The errors are typically (see the complete log at the end of this post):

  • Unknown fields
  • Already existing table
  • Multiple Primary Keys defined
  • Already used field name
  • Unable to drop field name
  • A duplicated Key field

My question are:

  • What action must I take to repair my database ? It's really unclear to me, looking at the logs.
  • Are these errors linked to the third-party modules I have used, and should I remove them before I upgrade ? Do I simply need to remove some files in $ROOT/modules/, or is this less trivial ?

Thanks for any help.

Following are the logs,

in order they happened. Sorry, the use of locale module translated them in french. Hope this is still useful.

Champ 'access' inconnu dans field list query: UPDATE test_users SET access = 1156695435 WHERE uid = 1 à la ligne 120 du fichier /home/www/tinou/test/includes/database.mysql.inc.

La table 'test_contact' existe déjà query: CREATE TABLE test_contact ( subject varchar(255) NOT NULL default '', recipients longtext NOT NULL default '', reply longtext NOT NULL default '' ) à la ligne 120 du fichier /home/www/tinou/test/includes/database.mysql.inc.

Champ 'subject' inconnu dans test_contact query: ALTER TABLE test_contact CHANGE subject category VARCHAR(255) NOT NULL à la ligne 120 du fichier /home/www/tinou/test/includes/database.mysql.inc.

Plusieurs clefs primaires dfinies query: ALTER TABLE test_contact ADD PRIMARY KEY (category) à la ligne 120 du fichier /home/www/tinou/test/includes/database.mysql.inc.

La table 'test_node_revisions' existe déjà query: CREATE TABLE test_node_revisions SELECT nid, nid AS vid, uid, type, title, body, teaser, changed AS timestamp, format FROM test_node à la ligne 120 du fichier /home/www/tinou/test/includes/database.mysql.inc.

Nom du champ 'log' déjà utilis query: ALTER TABLE test_node_revisions ADD log longtext à la ligne 120 du fichier /home/www/tinou/test/includes/database.mysql.inc.

Plusieurs clefs primaires dfinies query: ALTER TABLE test_node_revisions ADD PRIMARY KEY vid (vid) à la ligne 120 du fichier /home/www/tinou/test/includes/database.mysql.inc.

Nom de clef 'nid' déjà utilis query: ALTER TABLE test_node_revisions ADD KEY nid (nid) à la ligne 120 du fichier /home/www/tinou/test/includes/database.mysql.inc.

Nom de clef 'uid' déjà utilis query: ALTER TABLE test_node_revisions ADD KEY uid (uid) à la ligne 120 du fichier /home/www/tinou/test/includes/database.mysql.inc.

La table 'test_old_revisions' existe déjà query: CREATE TABLE test_old_revisions SELECT nid, type, revisions FROM test_node WHERE revisions != '' à la ligne 120 du fichier /home/www/tinou/test/includes/database.mysql.inc.

Ne peut effacer (DROP) 'type'. Vrifiez s'il existe query: ALTER TABLE test_node_revisions DROP type à la ligne 120 du fichier /home/www/tinou/test/includes/database.mysql.inc.

La table 'test_search_dataset' existe déjà query: CREATE TABLE test_search_dataset ( sid int(10) unsigned NOT NULL default '0', type varchar(16) default NULL, data longtext NOT NULL, KEY sid_type (sid, type) ) à la ligne 120 du fichier /home/www/tinou/test/includes/database.mysql.inc.

Un seul champ automatique est permis et il doit tre index query: ALTER TABLE test_contact DROP PRIMARY KEY à la ligne 120 du fichier /home/www/tinou/test/includes/database.mysql.inc.

Nom du champ 'cid' déjà utilis query: ALTER TABLE test_contact ADD COLUMN cid int(11) NOT NULL PRIMARY KEY auto_increment à la ligne 120 du fichier /home/www/tinou/test/includes/database.mysql.inc.

Nom de clef 'category' déjà utilis query: ALTER TABLE test_contact ADD UNIQUE KEY category (category) à la ligne 120 du fichier /home/www/tinou/test/includes/database.mysql.inc.

Nom du champ 'weight' déjà utilis query: ALTER TABLE test_contact ADD COLUMN weight tinyint(3) NOT NULL DEFAULT 0 à la ligne 120 du fichier /home/www/tinou/test/includes/database.mysql.inc.

Nom du champ 'selected' déjà utilis query: ALTER TABLE test_contact ADD COLUMN selected tinyint(1) NOT NULL DEFAULT 0 à la ligne 120 du fichier /home/www/tinou/test/includes/database.mysql.inc.

La table 'test_poll_votes' existe déjà query: CREATE TABLE test_poll_votes ( nid int(10) unsigned NOT NULL, uid int(10) unsigned NOT NULL default 0, hostname varchar(128) NOT NULL default '', INDEX (nid), INDEX (uid), INDEX (hostname) ) à la ligne 120 du fichier /home/www/tinou/test/includes/database.mysql.inc.

La table 'test_client' existe déjà query: CREATE TABLE test_client ( cid int(10) unsigned NOT NULL auto_increment, link varchar(255) NOT NULL default '', name varchar(128) NOT NULL default '', mail varchar(128) NOT NULL default '', slogan longtext NOT NULL, mission longtext NOT NULL, users int(10) NOT NULL default '0', nodes int(10) NOT NULL default '0', version varchar(35) NOT NULL default'', created int(11) NOT NULL default '0', changed int(11) NOT NULL default '0', PRIMARY KEY (cid) ) à la ligne 120 du fichier /home/www/tinou/test/includes/database.mysql.inc.

La table 'test_client_system' existe déjà query: CREATE TABLE test_client_system ( cid int(10) NOT NULL default '0', name varchar(255) NOT NULL default '', type varchar(255) NOT NULL default '', PRIMARY KEY (cid,name) ) à la ligne 120 du fichier /home/www/tinou/test/includes/database.mysql.inc.

La table 'test_file_revisions' existe déjà query: CREATE TABLE test_file_revisions ( fid int(10) unsigned NOT NULL default 0, vid int(10) unsigned NOT NULL default 0, description varchar(255) NOT NULL default '', list tinyint(1) unsigned NOT NULL default 0, PRIMARY KEY (fid, vid) ) /*!40100 DEFAULT CHARACTER SET utf8 */ à la ligne 120 du fichier /home/www/tinou/test/includes/database.mysql.inc.

Duplicata du champ '1-28' pour la clef 1 query: INSERT INTO test_file_revisions SELECT DISTINCT fid , vid, description, list FROM test_files_tmp à la ligne 120 du fichier /home/www/tinou/test/includes/database.mysql.inc.

Comments

elv’s picture

Did you also upgrade the database, with the update.php script at the root of your site ?

Fait beau à Toulouse ? ;)

tinou’s picture

Of course I did: These log entries have been generated by running the upgrade.php script.

I'm wondering if it's easier to start from a fresh 4.7 install and try to upgrade manually on the top of it. But that's a lot of work ...

Pas mal, on a eu un week-end plutôt ensoleillé. Z'êtes où, vous ? :-)