Hello,
I have nwiki installed and try to upgrade moodle from 1.9.10+ to 2.0. The script fail with errro in wiki tables.
What I could do in this case?
Hi, Dongsheng
You could see where update fail in this snapshot:
ftp://mirror.fis.unb.br/pub/moodle/upgrade_fail.png
Thanks.
Jose - It is strange that it would not work but I suspect that there was something different about the nwiki table structure. Normally the old tables are renamed to {name}_old and then the new tables are created and the data is brought over. It appears that the field subwikiid is not in the wiki_pages table which is of concern. I am not familiar with the nwiki names and structures but I suspect that it is because they were using a different table name. Could you provide the table structures of the wiki tables? Also I believe there was a similar issue filed in the tracker that you may want to follow up on and watch. Peace - Anthony
Thanks Antony for your response.
These are the table, about wiki, what I can see in moodle db (MySQL):
pagename
version
content
author
userid
created
lastmodified
refs
hits
editable
highlight
dfwiki
editor
groupid
ownerid
evaluation
[]'s
J. Eduardo
I have just updated my 1.9.6 site to moodle 2.0.1
On the 1.9.6 site I had upgraded the wiki to Ludo's nwiki which I believe is the basis of the wiki module in Moodle 2. However, when I upgraded to 2.0.1 it failed on updating the wiki with "Error writing to database. Debug info: Unknown column 'wtype' in 'where clause'".
How I can update to moodle 2 without losing the wikis already created? When I deleted the wiki module the upgrade completed successfully?
I am surprised that there are not more comments about this here as I can't believe that there are not a lot more people who used the Nwiki in 1.9 as the standard wiki was not actively supported and had many weaknesses.
Are there people who have successfully upgraded from 1.9 to 2 with nwiki?
There is another post about this here but it doesn't really take us any further.
Thanks Ludo. I shall look forward to it.
I also hope it will come soon..
Upgrade to 2.0.2 doesn't work too. When will be a patch available?
If you delete the folder mod/wiki then installation should continue normally.
If I do what you proposed, I can't install new wiki mod if I have old nwiki in my old moodle.
I think the best choice is wait for Ludo's patch.
I think that if you just delete the mod/wiki files then all the data should remain in the database until Ludo produces the update scripts.
Yes, my be it is possible.
In fact, if you, before upgrading, remove mod/wiki directy in new 2.02 files you can upgragind without error.
My problem is that I can't do it in my production site because I have a lot of wikis in its curses that We need work.
Upgrade from 1.9.12 to 2.0.3 also fails for much the same reasons!
We have just done a trial upgrade of our 3.5 million record Moodle installation (with an entire copy of the database and half a terabyte of files), and it all went swimmingly well with just a couple of correctable errors (like missing files) until it got to the Wiki! Even then the process ran smoothly up until 'Migrating old pages to new pages' and 'Migrating old history to new history', both of which were full of errors namely exceptions thrown with very little information given!
Error writing to database
* line 162 of /mod/wiki/db/upgrade.php: call to debugging()
* line 526 of /lib/upgradelib.php: call to xmldb_wiki_upgrade()
...
Error writing to database
* line 326 of /mod/wiki/db/upgradelib.php: call to debugging()
* line 175 of /mod/wiki/db/upgrade.php: call to wiki_upgrade_migrate_versions()
...
I have some clues to offer, I think that the test to avoid duplicate entries in /mod/wiki/db/upgrade.php at line 157 doesn't do what it is meant to...
try {
if (!$DB->record_exists('wiki_pages', array('subwikiid'=>$record->id, 'userid'=>$record->userid, 'title'=>$record->pagename))) {
$DB->insert_record('wiki_pages', $page);
}
} catch (dml_exception $e) {
// catch possible insert exception
debugging($e->getMessage());
continue;
}
and so the upgrade attempts to insert a record where it should not! It is notable that both lots of errors are thrown from the same place in the code, which is pretty surprising to me at least, since they are generated from quite different functions. I feel that things might have gone a little more easily if the Wiki team had chosen to rename mdl_wiki to mdl_wiki_old and run the upgrade by migrating this across to a new mdl_wiki table. It seems that its all a bit like trying to eat three Shreaded Wheat - but that one may not translate well!
Possibly, we may next try to explore getting rather fuller debug info!
Regards, John
Hi Ludo,
where is the patch available? I can't find it anywhere. Running in the same trouble as the others in this thread.
Best wishes
Daniel
I think we are out of luck...I don't think Ludo works at the same place anymore...doesn't respond to email.
Not being able to upgrade my wiki's is one of the reasons I'm sticking to Moodle 1.9.13 this year. I am going to recreate (with student help) all my nwiki's in 1.9 over to Moodle 2.1.1....all 378 of them during this school year so they are ready for next year.
Hi!
I'm going to upgrade form Moodle 1.9.1+ (Build: 20080604) to moodle 2.1 and i have several nwiki activities.
It is needed something to do the upgrade without problems?
Does anyone had any success upgrading moodle 1.9.x with nwiki to moodle 2.x wikis without losing old nwikis???