Forums | Mahara Community

Support /
Error upgrading to Mahara 1.8


Juan Ezeiza's profile picture
Posts: 35

28 November 2013, 0:41

I’m using Mahara 1.7.1 on Ubuntu 13.04 and Mysql 5.5.34. When I try to upgrade to Mahara 1.8 I get this message. Any ideas about what’s happening?
Thank you.

Aaron Wells's profile picture
Posts: 896

28 November 2013, 11:10

Hi Juan,

Based on that message, I would guess that your Mahara "root" user has an ID other than 0.

The "root" user is a special user account created during installation, which is used to store certain information, in particular the default page templates, and default custom layouts. The installer script creates it with ID 0, but occasionally we encounter sites where for unknown reasons the ID of the root user has changed.

We can determine if this is what's going on, by running this query in your database:

SELECT id, username FROM usr WHERE username='root' OR id=0;

If that is the case, and there's not some other usr account with id 0, you can probably just reassign the root user back to ID 0 (although I'd first run some more queries to make sure there aren't any pages or artefacts assigned to the root user's current ID, because if there are you'd need to change those as well.)

Alternately, you could edit the htdocs/lib/db/upgrade.php script on line 2471 so that instead of 'usr' => 0 it sets 'usr' to the actual ID of the root user.

Cheers,

Aaron

Juan Ezeiza's profile picture
Posts: 35

28 November 2013, 23:11

Hi Aaron,
Thank you for answering so quickly. You're right. Our Mahara has a "root" user id other than 0. In fact it's 311!
I'll try the second solution. It seems to be easiest one Smile
I'll take the time to upgrade our Mahara site next week and I'll tell you about.
Cheers,

Juan

Aaron Wells's profile picture
Posts: 896

02 December 2013, 11:13

Hi Juan,

I'm glad to help. Smile

I've seen the non-zero root user a couple of times now, and I'd love to figure out what's causing it. Do you know if someone at your institution manually changed the root user's ID at some point in the past, perhaps to make it easier to edit the default homepage?

If that's not the case, would you mind telling me which database you're using, and what version of Mahara your site was originally installed as? I suspect that, if the non-zero root user is not due to manual DB updates, it's probably an upgrade issue of some kind.

Cheers,

Aaron

Juan Ezeiza's profile picture
Posts: 35

02 December 2013, 21:46

Hi Aaron,

As far as I know nobody has manually changed the root user.

Our DB is Mysql (5.5.34) and our site was originally installed as 1.4 version. We have Mahara integrated with Moodle, in case it helps you to figure out what's happened.

Cheers,

Juan

Aaron Wells's profile picture
Posts: 896

03 December 2013, 12:34

Thanks Juan!

Juan Ezeiza's profile picture
Posts: 35

04 December 2013, 23:38

Today I've tried to upgrade our Mahara site and I haven't been able to do it Frown

First of all I've edited htdocs/lib/db/upgrade.php script on line 2471 as Aaron suggested and I've got this screen:

 After that I've recovered the upgrade.php script and changed the root ID to '0' in the DB. The result has been the same screen capture I got the first time I tried to upgrade our Mahara.

Any other ideas, please.

Aaron Wells's profile picture
Posts: 896

06 December 2013, 11:24

Hi Juan,

In your first error (from 28 Nov), the script errored out at line 2473 in upgrade.php. In this one, it's erroring out at 2440. If you're running the upgrade against the same copy of the DB as on Nov 28, then the problem is that it's trying to access the column view_layout.columns, but the column has already been dropped by later sections of the upgrade script in the initial run.

If you still have a copy of your DB from before you made the first installation attempt, I'd go back to that. If not... well, it'll be a little bit trickier. You may be able to complete the upgrade by removing some portions of the upgrade script. (This is why it's always recommended to back up your DB before performing an upgrade.)

Cheers,

Aaron

Juan Ezeiza's profile picture
Posts: 35

09 December 2013, 23:05

Hi Aaron,
In fact I've got the same DB. If I change the upgrade.php script I get the error on line 2473, and if I change the root ID to 0 I get the error on line 2440.
Anyway, I've upgraded our Mahara to 1.7.4 without any problem, and I will try to upgrade to 1.8 on Christmas holidays. Thank you.
Best regards,

Juan

Juan Ezeiza's profile picture
Posts: 35

09 January 2014, 6:47

Hi Aaron,
Surprisingly, the upgrading from 1.7.4 to 1.8.1 worked fine. No error messages.
Thank you. Cheers.

10 results