Forums | Mahara Community

Support /
error upgrading to 1.8rc1


steve P's profile picture
Posts: 122

08 October 2013, 14:31

Hi all

I have tried an update from 1.6.3 to 1.8rc1 on a LAMP server unsuccessfully. Any suggestions for how to go about a successful upgrade? Many thanks.

Aaron Wells's profile picture
Posts: 896

08 October 2013, 16:12

Hi Steve,

Thanks for trying out 1.8rc1! (Just so you know, it's a "release candidate" version for testing, not ready for production use yet.)

I'm able to successfully run an upgrade from 1.6.3 to 1.8rc1 in my test environment. Can you provide some more details on what problems you're experiencing? Are there any error messages?

Cheers,

Aaron

steve P's profile picture
Posts: 122

08 October 2013, 16:54

Hi Aaron

Thanks for replying. The only error on screen is what is in the pic I embedded in the previous post. The upgrade is failing when altering table block_instance. See

http://tinypic.com/r/1zr78/5

I realise it's just a release candidate, and have been able to install a fresh version with no issues.

Can you suggest a way I can dig deeper to get to the root of the problem?

Thanks.

Aaron Wells's profile picture
Posts: 896

08 October 2013, 18:26

Thanks, that image wasn't showing up in the previous post.

One thing you can do, which will turn on a little more debugging output, is try setting in your config.php file:

$cfg->productionmode = false;

Although from that screenshot it's clear what's causing the problem. It's failing while trying to drop the blocinst_viecolord_uk key from the block_instance table, which is something that we do as part of converting all the blocks from the old layout system to the new 1.8 layout system.

We might be able to get a more helpful error message if you connect to your database and try to run the SQL query manually:

ALTER TABLE block_instance DROP KEY blocinst_viecolord_uk;

It may also be worth doing a "describe block_instance" to see whether your block_instance table even has that key. If the key is missing, that may cause the query to error out, and that's something we can try to fix in the upgrade script if it's a normal condition.

By the way, are you running MySQL or Postgres?

Also, how old is this Mahara instance? Like, what version was it originally installed as, before it was upgraded to 1.6.3?

Cheers,

Aaron

steve P's profile picture
Posts: 122

09 October 2013, 9:29

Thanks Aaron. I'll try that next time I'm in the office and report back.

It's a MySQL server (I know, don't tell me off!). We've been upgrading since version 0.9 in 2008.

Cheers.
Aaron Wells's profile picture
Posts: 896

09 October 2013, 11:02

No worries, I just wanted to get some more information to see if I can replicate the problem. Laughing

Hm, I am able to do the upgrade from a clean install of 1.6.3 to 1.8rc1 in mysql.

But, I've noticed before that there's some "schema drift" due to minor inconsistencies in the upgrade scripts, if you go from 1.0 (or earlier!) all the way up to the latest versions. It's possible that's part of what's causing your problem. I've been meaning to fix those inconsistencies anyway, so I'll see whether I really can install a clean 1.0 and upgrade it all the way to 1.8.

Cheers,

Aaron

anonymous profile picture
Account deleted
Posts: 6

11 October 2013, 12:57

Hi Aaron,

Just following on from Steve's post - our block_instance table has a key called blocinst_viecolord_uix, rather than blocinst_viecolord_uk which may suggest why it isn't finding it?  Any ideas why this is?

Thanks,

Jacqui.

 

Aaron Wells's profile picture
Posts: 896

11 October 2013, 15:09

Hi Jacqui,

That's interesting, we actually found the same thing when testing out the upgrade for http://myportfolio.school.nz as well. Perhaps there was an older version of Mahara that created it as an index rather than a key. I'll have to update the code to deal with either situation, then.

Is your site several versions old as well?

Cheers,

Aaron

anonymous profile picture
Account deleted
Posts: 6

11 October 2013, 15:57

Hi Aaron,

We're at version 1.6.3 (2012080610).

Thanks,

Jacqui

 

 

Aaron Wells's profile picture
Posts: 896

11 October 2013, 16:07

Okay, I've determined the cause of this problem. There was a change in the XMLDB library in 1.2.0. Prior to that, when you told Mahara to create a unique key, it actually created a unique index. https://bugs.launchpad.net/mahara/+bug/1238363

If I'm correct, this will only be affecting sites that have been around since prior to 1.2.0.

Cheers,

Aaron

12 results