Upgrade from 1.9.10+ to 2.0 fail

Upgrade from 1.9.10+ to 2.0 fail

by José Eduardo Martins -
Number of replies: 22

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?

 

Average of ratings: -
In reply to José Eduardo Martins

回复: Upgrade from 1.9.10+ to 2.0 fail

by Zhigang Sun -
When I heard that NWiki will be official in Moodle 2.0, I believed that it was the time to use NWiki in my site since upgrading from nwiki to moodle 2 could be smoother than upgrading from old wiki. Was I wrong? I wish I was not, smile
In reply to José Eduardo Martins

Re: Upgrade from 1.9.10+ to 2.0 fail

by Dongsheng Cai -
Hi, José

Can you please send me more details of error to me? I will try to get it sorted ASAP, dongsheng@moodle.com

Thanks.
In reply to Dongsheng Cai

Re: Upgrade from 1.9.10+ to 2.0 fail

by José Eduardo Martins -

Hi, Dongsheng

You could see where update fail in this snapshot:

ftp://mirror.fis.unb.br/pub/moodle/upgrade_fail.png

Thanks.

 

 

 

 

 

In reply to José Eduardo Martins

Re: Upgrade from 1.9.10+ to 2.0 fail

by Anthony Borrow -
Picture of Core developers Picture of Plugin developers Picture of Testers

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

In reply to Anthony Borrow

Re: Upgrade from 1.9.10+ to 2.0 fail

by José Eduardo Martins -

Thanks Antony for your response.

These are the table, about wiki,  what I can see in moodle db (MySQL):

  • mdl_wiki
  • mdl_wiki_locks
  • mdl_wiki_pages (in fact, there is no subwikiid field):

pagename
version
content
author
userid
created
lastmodified
refs
hits
editable
highlight
dfwiki
editor
groupid
ownerid
evaluation

  • mdl_wiki_synonymous
  • mdl_wiki_votes

[]'s

J. Eduardo

In reply to José Eduardo Martins

Re: Upgrade from 1.9.10+ to 2.0 fail

by John Ryan -

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 databaseDebug 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?

In reply to John Ryan

Re: Upgrade from 1.9.10+ to 2.0 fail

by José Eduardo Martins -

Hello John,

I removed completely wiki module and purge moodle MySQl database all wiki tables and don't have success to upgrading.

I am waiting for 2.0.2 to see if I can upgrading from 1.9.10+.

In reply to José Eduardo Martins

Re: Upgrade from 1.9.10+ to 2.0 fail

by John Ryan -

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.

In reply to José Eduardo Martins

Re: Upgrade from 1.9.10+ to 2.0 fail

by Ludo (Marc Alier) -
Hi Folks, in a matter of days we will release a patch for NWiki for Moodle 1.9 that will allow contents to be migrated to Moodle 2 wiki. Sorry for the delay, its been a crazy autum for us. L.
In reply to Ludo (Marc Alier)

Re: Upgrade from 1.9.10+ to 2.0 fail

by John Ryan -

Thanks Ludo. I shall look forward to it.

In reply to Ludo (Marc Alier)

Re: Upgrade from 1.9.10+ to 2.0 fail

by Karsten Burger -

Upgrade to 2.0.2 doesn't work too. When will be a patch available?

In reply to Karsten Burger

Re: Upgrade from 1.9.10+ to 2.0 fail

by Erik Ringmar -
I too just upgraded to 2.02 from 1.9 but the upgrade can't proceed due to the wiki plugin. This is the error message I get:

Debug info: Unknown column 'wtype' in 'where clause'
UPDATE mdl_wiki
SET wikimode = ?
WHERE wtype = ?
[array (
0 => 'collaborative',
1 => 'group',
)]
Stack trace:

* line 394 of /lib/dml/moodle_database.php: dml_write_exception thrown
* line 703 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
* line 91 of /mod/wiki/db/upgrade.php: call to mysqli_native_moodle_database->execute()
* line 526 of /lib/upgradelib.php: call to xmldb_wiki_upgrade()
* line 265 of /lib/upgradelib.php: call to upgrade_plugins_modules()
* line 1426 of /lib/upgradelib.php: call to upgrade_plugins()
* line 290 of /admin/index.php: call to upgrade_noncore()

Is there some way this plugin can be temporarily deleted? (I just deleted the wiki entries in the Mysql database but that doesn't seem to have made any difference)

yours always,

Erik
In reply to Erik Ringmar

Re: Upgrade from 1.9.10+ to 2.0 fail

by John Ryan -

If you delete the folder mod/wiki then installation should continue normally.

In reply to John Ryan

Re: Upgrade from 1.9.10+ to 2.0 fail

by José Eduardo Martins -

 

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.

In reply to José Eduardo Martins

Re: Upgrade from 1.9.10+ to 2.0 fail

by John Ryan -

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.

In reply to John Ryan

Re: Upgrade from 1.9.10+ to 2.0 fail

by José Eduardo Martins -

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.

In reply to José Eduardo Martins

Re: Upgrade from 1.9.10+ to 2.0 fail

by John White -

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

In reply to Ludo (Marc Alier)

Re: Upgrade from 1.9.10+ to 2.0 fail

by Daniel Hoffmann -

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

In reply to Daniel Hoffmann

Re: Upgrade from 1.9.10+ to 2.0 fail

by AL Rachels -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

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.  sad

In reply to José Eduardo Martins

Vastus: Upgrade from 1.9.10+ to 2.0 fail

by Tõnis Tartes -
Picture of Core developers Picture of Plugin developers Picture of Testers Picture of Translators

Does anyone had any success upgrading moodle 1.9.x with nwiki to moodle 2.x wikis without losing old nwikis???