Problems when upgrading from 4.0.3 to 4.1.3

Author Message

Frode Slettum

Saturday 15 August 2009 2:34:20 am

Hi

Had an 4.0.0 site that I have upgraded to 4.0.3, and now wants to upgrade to 4.1.3.

I'm following the upgrade documentation and everything works fine until I upgrade the database:

mysql -u root -p database_name < update/database/mysql/4.1/dbupdate-4.0.0-to-4.1.0.sql

Then I get the following error message: ERROR 1061 (42000) at line 11: Duplicate key name 'ezcontent_language_name'

If I try to run it again, it says: ERROR 1060 (42S21) at line 5: Duplicate column name 'data_text5' (and again and again as I keep trying :) )

I try to finish the rest of the upgrade process and everything works fine except:

php update/common/scripts/4.1/addlockstategroup.php

It says: Fatal error: A database transaction in eZ Publish failed.

I then try to log in, but the old admin password doesn't work, and the default site doesn't look good. I'm using the ezwebin extension with a few changes.

Tried both 4.1.0 og and 4.1.3 with the same result.

Installed and upgraded ez Components with PEAR before all this.

Saw a few others have the same problem, but their posts didn't help me.

Can anyone help me?

- Frode

liza sloan

Monday 17 August 2009 1:34:49 am

My friend also had the same problem upgrading. He told me about his problems so now I am having second thoughts of upgrading my software. Any suggestions or has this been resolved?

LIza Sloan

André R.

Monday 17 August 2009 4:36:48 am

Open the sql file to see witch parts you should skip (the "-- START: from 4.0.1", "-- START: from 3.10.1" and "-- START: from 4.0.2" sections) + skip the parts that has already been inserted (in your case everything before "ezcontent_language_name").

That is, when upgrading from 4.0.3 and possible higher (as in some indexes might have been merged back to 4.0.4+):

SET storage_engine=InnoDB;
UPDATE ezsite_data SET value='4.1.0' WHERE name='ezpublish-version';
UPDATE ezsite_data SET value='1' WHERE name='ezpublish-release';

ALTER TABLE ezworkflow_event ADD COLUMN data_text5 LONGTEXT;

ALTER TABLE ezrss_export ADD COLUMN node_id INT NULL;
ALTER TABLE ezrss_export_item ADD COLUMN category VARCHAR( 255 ) NULL;

ALTER TABLE ezgeneral_digest_user_settings ADD UNIQUE INDEX ezgeneral_digest_user_settings_address(address);
DELETE FROM ezgeneral_digest_user_settings WHERE address not in (SELECT email FROM ezuser);

ALTER TABLE ezbinaryfile MODIFY COLUMN mime_type VARCHAR(255) NOT NULL;

CREATE TABLE ezcobj_state (
  default_language_id int(11) NOT NULL default '0',
  group_id int(11) NOT NULL default '0',
  id int(11) NOT NULL auto_increment,
  identifier varchar(45) NOT NULL default '',
  language_mask int(11) NOT NULL default '0',
  priority int(11) NOT NULL default '0',
  PRIMARY KEY  (id),
  UNIQUE KEY ezcobj_state_identifier (group_id,identifier),
  KEY ezcobj_state_lmask (language_mask),
  KEY ezcobj_state_priority (priority)
);

CREATE TABLE ezcobj_state_group (
  default_language_id int(11) NOT NULL default '0',
  id int(11) NOT NULL auto_increment,
  identifier varchar(45) NOT NULL default '',
  language_mask int(11) NOT NULL default '0',
  PRIMARY KEY  (id),
  UNIQUE KEY ezcobj_state_group_identifier (identifier),
  KEY ezcobj_state_group_lmask (language_mask)
);

CREATE TABLE ezcobj_state_group_language (
  contentobject_state_group_id int(11) NOT NULL default '0',
  description longtext NOT NULL,
  language_id int(11) NOT NULL default '0',
  name varchar(45) NOT NULL default '',
  PRIMARY KEY  (contentobject_state_group_id,language_id)
);

CREATE TABLE ezcobj_state_language (
  contentobject_state_id int(11) NOT NULL default '0',
  description longtext NOT NULL,
  language_id int(11) NOT NULL default '0',
  name varchar(45) NOT NULL default '',
  PRIMARY KEY  (contentobject_state_id,language_id)
);

CREATE TABLE ezcobj_state_link (
  contentobject_id int(11) NOT NULL default '0',
  contentobject_state_id int(11) NOT NULL default '0',
  PRIMARY KEY  (contentobject_id,contentobject_state_id)
);

ALTER TABLE ezuservisit ADD COLUMN login_count int(11) NOT NULL default 0;
ALTER TABLE ezuservisit ADD INDEX ezuservisit_co_visit_count( current_visit_timestamp, login_count );

ALTER TABLE ezforgot_password ADD INDEX ezforgot_password_user(user_id);

ALTER TABLE ezsession ADD COLUMN user_hash VARCHAR( 32 ) NOT NULL default '';

ALTER TABLE ezpending_actions ADD COLUMN created int(11) DEFAULT NULL;
ALTER TABLE ezpending_actions ADD INDEX ezpending_actions_created ( created );

DROP TABLE ezimage;
DROP TABLE ezimagevariation;

Frode: In your case here, also skip the first three ALTER TABLE statements(remove them or comment them out with --).

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Frode Slettum

Tuesday 18 August 2009 11:44:27 am

Thank you sir, that worked fine!

Anyway, the ezwebin upgrade did not, but I guess I have customized the extention in a bad way. I have edited the files from the extensions directory (and some files from the var directory as well).

Frode

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.