I'm having problems updating my site from 4.6.5 (I think) to 4.7, and I'm having no success. I seem to have two problems:

+ I get a lot of error messages regarding SQL errors (alter, drop, create)

+ The nodes that contain UTF-8 characters becomes garbled

My site is pretty "plain" I've avoided using any module (except markdown) in order to avoid problems during backup ... and I have no knowledge of drupal internals so I don't really know where to start looking for the problem.

So I wonder if there is some way I can export my current site to, for example, a XML-file. Delete my current installation completely, install 4.7 and then import the data from the 4.6 site (right now it feel like this would be a better, although slower, way of updating a site)???

Comments

Steve Hanson’s picture

Did you follow ALL of the update instructions?
Did you disable all the non-core modules before you tried to update?
Did you run update.php after you updated the software?
Exactly WHAT error messages are you getting?

I don't think that doing what you suggest is going to make your upgrade path any easier - it will probably just make life harder. What you have now is probably salvageable but people will need more detailed information to help out.

Steve Hanson
Principal Consultant Cruiskeen Consulting LLC
http://www.cruiskeenconsulting.com

Steve Hanson
Principal Consultant Cruiskeen Consulting LLC
http://www.cruiskeenconsulting.com
http://www.cms-farm.com

Dublin Drupaller’s picture

totally off topic..but I couldn't resist. Do you have a guy called Myles Na Gapaleen working with you, Steve? Just noticed the name of your company.

btw skromta..totally agree with what Steve said re: the problem you're having..

Following each step meticulously is important. From running into problems before, I noticed that if I didn't disable add-on modules before upgrading, it considerably increased the problems.

Dub

Currently in Switzerland working as an Application Developer with UBS Investment Bank...using Drupal 7 and lots of swiss chocolate

Steve Hanson’s picture

Yes, there is a connection, actually -
Our farm is named Cruiskeen Lawn - which I'd guess you're familiar with from the question. It's also a little appropriate because my hobby out here on the farm is making beer and wine, so the Gaelic "little jug" is appropriate. Never mind that we're in Western Wisconsin, so I find I pretty much always have to explain what cruiskeen means every time I introduce myself. In retrospect this may not have been the best name choice, but ----

Also, my wife is of Irish descent and lived in Dublin for a while and we're both Flann O'Brien fans, so it all sort of fits together.

Steve Hanson
Principal Consultant Cruiskeen Consulting LLC
http://www.cruiskeenconsulting.com

Steve Hanson
Principal Consultant Cruiskeen Consulting LLC
http://www.cruiskeenconsulting.com
http://www.cms-farm.com

Dublin Drupaller’s picture

Hey Steve,

(sorry guys..this is completely off topic)

how cool is that?

There was a stunning documentary made recently and aired on RTE about the enigmatic Brian O' Nolan, which celebrated not just his wit, but touched on the dark side of him as well. It was a superb documentary and while some of it was a bit sad and tragic....his genius shone through all of it.

I notice there has been a resurgence of interest in At Swim Two Birds and in particular, The Third Policeman because of the American "LOST" series...but all those people checking out those probably won't discover the his Irish Times missive...Cruiskeen Lawn.

Fair play to ya, Steve. nice one.

(as an aside to anyone who stumbles across this and is wondering what I'm blathering on about...apologies for going off topic, but I'm a huge fan of Brian O'Nolan, who had a legendary column in an Irish newspaper called Cruiskeen Lawn.)

Dub

Currently in Switzerland working as an Application Developer with UBS Investment Bank...using Drupal 7 and lots of swiss chocolate

skromta’s picture

Did you follow ALL of the update instructions?

As far as I know

Did you disable all the non-core modules before you tried to update?

Yes

Did you run update.php after you updated the software?

Yes

Exactly WHAT error messages are you getting?

If I remove the messages that are OK

Update #110
DROP TABLE {search_index}
Failed: CREATE TABLE {search_total} ( word varchar(50) NOT NULL default '', count int(10) unsigned default NULL,
Failed: ALTER TABLE {blocks} DROP path
Failed: ALTER TABLE {blocks} ADD visibility tinyint(1) NOT NULL
Failed: ALTER TABLE {blocks} ADD pages text NOT NULL

Update #111
Failed: ALTER TABLE {sessions} ADD PRIMARY KEY sid (sid)

Update #112
Failed: CREATE TABLE {flood} ( event varchar(64) NOT NULL default '', hostname varchar(128) NOT NULL default '',
timestamp int(11) NOT NULL default '0' );

Update #113
Failed: ALTER TABLE {accesslog} ADD aid int(10) NOT NULL auto_increment, ADD PRIMARY KEY (aid)

Update #114
Failed: CREATE TABLE {queue} ( nid int(10) unsigned NOT NULL, uid int(10) unsigned NOT NULL, vote int(3) NOT
NULL default '0', PRIMARY KEY (nid, uid) )
Failed: ALTER TABLE {node} DROP votes
Failed: ALTER TABLE {node} DROP score
Failed: ALTER TABLE {node} DROP users

and it continues like this until update #128 which gives the last error message. After that everything seems to be OK.

Steve Hanson’s picture

As a first guess it sounds like the user that is authenticating into MySQL for you doesn't have full permissions for the tables - have you checked that? It sounds like you can't create or alter tables.

Steve Hanson
Principal Consultant Cruiskeen Consulting LLC
http://www.cruiskeenconsulting.com

Steve Hanson
Principal Consultant Cruiskeen Consulting LLC
http://www.cruiskeenconsulting.com
http://www.cms-farm.com

skromta’s picture

Other modification, all of the types the that failed, are completed successfully.

asimmonds’s picture

Are you sure you were updating from 4.6.5?, as update #110 -> #114 is for 4.5.x. If it was from 4.6.5 then your database had lost what schema version it was at.

skromta’s picture

Pretty sure, I've never used 4.5 since I started to use Drupal about two months ago. But I started to suspect something like what you describe. Is there some way to check what version update 128 belongs to, the last one that gives an error.

Could it simply be that everything is OK but that the update script misses the schema version as you describe?

skromta’s picture

Stupid me, I didn't think that info about version and db number is in the update.php file (at least kind of)

In the file it says

$sql_updates = array(
'2004-10-31: first update since Drupal 4.5.0 release' => 110,
'2004-11-07' => 111, '2004-11-15' => 112, '2004-11-28' => 113,
'2004-12-05' => 114, '2005-01-07' => 115, '2005-01-14' => 116,
'2005-01-18' => 117, '2005-01-19' => 118, '2005-01-20' => 119,
'2005-01-25' => 120, '2005-01-26' => 121, '2005-01-27' => 122,
'2005-01-28' => 123, '2005-02-11' => 124, '2005-02-23' => 125,
'2005-03-03' => 126, '2005-03-18' => 127, '2005-03-21' => 128,
// The following three updates were made on the 4.6 branch
'2005-04-14' => 128, '2005-05-06' => 128, '2005-05-07' => 128,
'2005-04-08: first update since Drupal 4.6.0 release' => 129,
'2005-04-10' => 130, '2005-04-11' => 131, '2005-04-14' => 132,
'2005-04-24' => 133, '2005-04-30' => 134, '2005-05-06' => 135,
'2005-05-08' => 136, '2005-05-09' => 137, '2005-05-10' => 138,
'2005-05-11' => 139, '2005-05-12' => 140, '2005-05-22' => 141,
'2005-07-29' => 142, '2005-07-30' => 143, '2005-08-08' => 144,
'2005-08-15' => 145, '2005-08-25' => 146, '2005-09-07' => 147,
'2005-09-18' => 148, '2005-09-27' => 149, '2005-10-15' => 150,
'2005-10-23' => 151, '2005-10-28' => 152, '2005-11-03' => 153,
'2005-11-14' => 154, '2005-11-27' => 155, '2005-12-03' => 156,
);

So all the updates that fails are 4.5 updates with the exception of 128, but I've never used 4.6.0 and the changelog.txt of my current installation says 4.6.5 with a change date of 2005-12-12. This would mean that I'm using database #156?

So, instead of trusting the update script I should probably just try selecting version 156 and see what happens ... hmm, something to play with tonight.

skromta’s picture

but I don't know why. I tried a lot of different things which all failed, then I updated to 4.6.6 before going to 4.7.0 and it worked. The only problem was that åäö didn't transfer well but since I only had 4 nodes with these characters it was easiest to manually fix this.