technonaturalist

image link to hive image link to ko-fi

drupal 6

Drupal 7 upgrade from HELL

Modded to be slightly more useful as I wrote the other one while slightly delirious.

  • upgrade to latest D6
  • drush arb default --destination="wherever/you/like"
  • mysql update systemsetstatus='0' where filename like 'sites%'
  • delete 6.x, retain /files and /sites directories, remember any mods to .htaccess
  • drop in 7.0 files
  • drush updb
  • if no error, press y
  • if error occurs, make a note of what you need to do to fix it. If this is a repeat run, fix all errors noted
  • rename/move your Drupal directory (or delete it but in the event you need it later)
  • from above where the Drupal directory should be, drush arr [backup-filename-without-square-brackets].tar
  • repeat from 3 til everything works
  • drush up -y
  • go do all the other little bits and pieces you need to do with the theme and modules

Problems I hit

  • managed file duplicates: mysql select * from `files` where `filepath` like `%string%'; delete from `files` where `fid`='number'; I only had a handful to deal with at any one time so didn’t mind doing them one by one, you’ll probably want a script if you have a lot :)
  • comment stupidity: drop index comment_uid on comments; drop index last_comment_uid on node_comment_statistics;

Drupal notes: backup process with drush

There’s probably a script for this. Or maybe drush is the script. Is all good, some things are done much faster with commandline :)

drush vset maintenance_mode 1 
drush cc all 
drush arb default --destination=../[site]-[date].tar

And if there’s updates to be done:

drush up -y

At the end:

drush vset maintenance_mode 0

Drupal 6 notes: dealing with a users.csv file

Think I’m one of the few people on the planet who could have trouble with something as basic as this.

Problem: csv dump of the users table will not import no matter how you tweak the settings.

Solution:

  1. open csv file in NeoOffice (or whatever your spreadsheet thingi of choice is). I had to edit mine to change the user1 in the csv to uid 2 as there is already a user1 in the D7 it will be going into, other people may not need to edit theirs
  2. save the file, and keep it in csv format rather than changing to the native format of the spreadsheet
  3. using phpmyadmin, go to the database and find the users table, and select import
  4. browse for the csv file, leave all settings as they are, press go

In my case running the thing through NeoOffice stuck semi-colons all over the place which apparently made it easier for phpmyadmin (or MySQL, not sure which) to deal with. User table inserted.

Beta!

I survived the alpha iterations! Learned a bit but didn’t end up helping much (or at all really) aside from something like a bug report and confirming a UX issue. So now we’re sitting on beta1 and I feel slightly more confident putting stuff here as from memory the betas are upgradeable. Alphas are not.

I remembered to export my Views this time so didn’t have to completely redo them :) I’ve left out the links view though as I’m formulating a better idea on how to do that page, the feed and the fynposts though were a bit of naffing around and twice over was enough. I’m slightly miffed that Zemanta isn’t picking up the editor but I’m currently not sure if that’s the fault of D7, or some component of the editor (it’s Wysiwyg with TinyMCE). Somehing there has changed as it works fine with D6. Hoping that they’ll upgrade Zemanta and it will miraculously fix everything.