Wrong datatype. Upgrading.

Wrong datatype. Upgrading.

by Tom Sweeney -
Number of replies: 9
I am currently upgrading. All appeared to go well but when I try to enter a course I get this warning instead:

Warning: Wrong datatype in asort() call in /home/........./......./moodle/course/lib.php on line 486

Error finding or creating section structures for this course

Continue

Any suggestions.

Thank you
Tom
Average of ratings: -
In reply to Tom Sweeney

Re: Wrong datatype. Upgrading.

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
After upgrading the Moodle files, did you visit the administration page to allow the databases to be upgraded?
In reply to Martin Dougiamas

Re: Wrong datatype. Upgrading.

by Tom Sweeney -
Hi Martin

Yes I did and tables were all updated successfully. I also notice that when I go to module management in the new admin page the modules appear have the 'asleep' sign under the hide/show title and I cannot change this.

Before upgrading I copied my existing tables to a new database and set up a fresh moodle directory. I copied into this my existing config (adjusted for the new database and location).

Thank you
Tom
In reply to Tom Sweeney

Re: Wrong datatype. Upgrading.

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
It does sound like the tables haven't properly upgraded, and that they are missing out on fields named "visible".

Yours is the first upgrade I've heard of to do this, so I'm suspecting something went wrong with the table move ...

What version did you have installed before?
In reply to Martin Dougiamas

Re: Wrong datatype. Upgrading.

by Tom Sweeney -
Hi Martin

Version:
1.0.8.1


When exporting the tables I exported data and structure ticking all of the following:
Add 'drop table'
Complete inserts
Extended inserts
Enclose table and field names with backquotes
Save as file

Many thanks

Tom
In reply to Tom Sweeney

Re: Wrong datatype. Upgrading.

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
The export from phpmyadmin looks OK.

I'm assuming you still have the original tables - can you try the whole export process again and then try the Moodle upgrade again?

You should see lots of SQL statements fly by during the upgrade - take time to look through them all and see if there's any errors.
In reply to Martin Dougiamas

Re: Wrong datatype. Upgrading.

by Tom Sweeney -
Hi Martin

No luck yet. I have repeated the export and upload. After visiting admin I see a single page with alterations to the tables. All say successful. I then get taken to the site configuration page which looks okay. Than when I visit the module management area the modules are all asleep.

I did have a workshop and chatarea mod in the old site. I have copied these across.

Many thanks

Tom

In reply to Tom Sweeney

Re: Wrong datatype. Upgrading.

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
No more ideas at the moment, sorry ... The chatarea mod probably won't be compatible with Moodle 1.0.9 though.
In reply to Martin Dougiamas

Re: Wrong datatype. Upgrading.

by Tom Sweeney -
Okay thanks, I will keep trying.

Tom
In reply to Tom Sweeney

Re: Wrong datatype. Upgrading.

by Tom Sweeney -
Nailed it I hope.

Due to an incomplete upgrade the values in the config table had been updated to reflect the new version, this was then stopping the rest of the tables being upgraded.

Not sure how I managed to do this, probably got confused swapping databases and directories?

Once I replaced these values with the correct numbers from the old version.php the rest worked. Guess it was just as well I have followed your back up suggestions.

Thanks for this fantastic piece of software.

Tom