Re: Upgrade 2.7.19 > 3.1.5+ : XML database file not found!

Re: Upgrade 2.7.19 > 3.1.5+ : XML database file not found!

by Visvanath Ratnaweera -
Number of replies: 7
Picture of Particularly helpful Moodlers Picture of Translators
This is a continuation of https://moodle.org/mod/forum/discuss.php?d=350361 in the Quiz forum.

I get stuck at:
===
mod_assignment
XML Datenbankdatei-Fehler gefunden

Weitere Informationen über diesen Fehler

Debug info: File does not exist
Error code: ddlxmlfileerror
Stack trace:
line 344 of /lib/ddl/database_manager.php: ddl_exception thrown
line 368 of /lib/ddl/database_manager.php: call to database_manager->load_xmldb_file()
line 690 of /lib/upgradelib.php: call to database_manager->install_from_xmldb_file()
line 432 of /lib/upgradelib.php: call to upgrade_plugins_modules()
line 1742 of /lib/upgradelib.php: call to upgrade_plugins()
line 683 of /admin/index.php: call to upgrade_noncore()
===
The "more information" link points to https://docs.moodle.org/31/en/error/moodle/ddlxmlfileerror

This is an "old" site started around Moodle 1.6. Since early Moodle 2 updates/upgrades are done with Git. Even this time Git did not complain. The assignment plug-in "2.2" is deactivated since some time.
Average of ratings: -
In reply to Visvanath Ratnaweera

Re: Upgrade 2.7.19 > 3.1.5+ : XML database file not found!

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Looks like a confusion between mod/assign and mod/assignment.

The upgrade script is looking for mod/assignment/db/install.xml, which is not there. But there is a mod/assign/db/install.xml. Does it give a hint?
In reply to Visvanath Ratnaweera

Re: Upgrade 2.7.19 > 3.1.5+ : XML database file not found! [resolved]

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
For whatever the reason, ./mod/assignment directory was incomplete! I cloned a new 3.1 and replaced the ./mod/assignment directory completely. The upgrade finished after that.

Still testing for everything (touch wood ;) !
In reply to Visvanath Ratnaweera

Re: Upgrade 2.7.19 > 3.1.5+ : XML database file not found! [resolved]

by Ken Task -
Picture of Particularly helpful Moodlers

That indeed is strange ... BTW, did send an EMail that suggested side loading fresh 3.1 code or 2.7 code to see where the missing files went.

I've never had a git pull fail in the code directory that was being marched upwards - take that back ... one time ... when the one that should be used was un-available for some reason and had to use the other repo.

Have to ask ... once you have a code directory under git, you are just executing commands to change the tracking branch and then checkout that branch, correct?

Like this?

git branch --track MOODLE_3#_STABLE origin/MOODLE_3#_STABLE
git checkout MOODLE_3#_STABLE

Anyhooo iit's solved and you are marching onwards ... congrats ... march on!

'spirit of sharing', Ken



In reply to Visvanath Ratnaweera

Re: Upgrade 2.7.19 > 3.1.5+ : XML database file not found!

by Ken Task -
Picture of Particularly helpful Moodlers

About the xml file ... if you side loaded a fresh 2.7.x via git ... ie, into another work directory, then find the missing install.xml in the side load ... assuming it will exist .... and copy to current working code? 

In other words, try to give moodle what it's seeking.

'spirit of sharing', Ken


Average of ratings: Useful (1)
In reply to Ken Task

Re: Upgrade 2.7.19 > 3.1.5+ : XML database file not found!

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Ken

Our posts crossed.

In short: As you pointed out, "side loading" clean code was the solution.

Longer version: I can't explain how Git lost track of my code. This being an "old" site, I was careful. Did a trial upgrade, sent a whole team to test. All was well. Today was the upgrade of the production Moodle, with an agreed dead line. The two hiccups meant a delay of two hours, 'course prohibitive in Swiss standards!
;-(

Can confirm:
git branch --track MOODLE_31_STABLE origin/MOODLE_31_STABLE
git checkout MOODLE_31_STABLE

That said, I am not so sure, whether my trial upgrade was on a fresh set of code. I have no other explanation for the missing files. Git didn't complain and all the key files I know, where there are version information, are correct.

Well, don't expect a serious post-mortem, now this 3.1 is in production. (I have a bad feeling though, and in the Murphy country, those bad feelings do get materialzed!)

Whatever, will write you a PM on the OT, once the dust settle. Not that we are going to change history, you know...!
In reply to Visvanath Ratnaweera

Re: Upgrade 2.7.19 > 3.1.5+ : XML database file not found!

by Ken Task -
Picture of Particularly helpful Moodlers

Totally understand ... a 'march' is never fun and full of potential catch 22's.  Have learned, the hard way, that even after smooth sailing all the way through version 2's on 4 servers, the test run on a 2.9.x to 3.0.whatever highest at that time showed the error of my prep.   A plugin hadn't been keeping pace and I didn't do good enough research on addons/plugins.   My 'bad', as they say.

So added to the list of things to check ... plugins/addons ... I knew that ... duh!

So now I have moosh installed on all of them .. run the plugins check to make sure there is a compat version of all addons prior to pulling the trigger on upgrading.   Even have to check with 'client' to find out just how significant it is to keep the plugin that hasn't been kept up to date .... 'client' sometimes installs on production to get a look see, then decides not to use (even though there is a sandbox for such things - it's just 'eaiser' for 'client' even if 'client' has been warned to be 'careful' for such play on production).

It's their moodle ... and they can use it/abuse it however they like.    Hmmm ... is that why I make the 'big bucks'? (yeah, right).

Anyhoo ... glad you got it sorted.

Kinda shows this is an area that Moodle will one day have to address ... updating and/or upgrading Moodle from within Moodle itself.

That's becoming the 'expectation'.

'spirit of sharing', Ken


In reply to Visvanath Ratnaweera

Re: Upgrade 2.7.19 > 3.1.5+ : XML database file not found!

by Ken Task -
Picture of Particularly helpful Moodlers

Got your PM ... hate that thing ... sent you my addy for lengthy discussions/cussion off list.

Anyhooo ...

Don't have a 2.7 any more to look see and much of below is from memory ... which as we all know declines with age ...

Don't re-call now which version it was that had the Assignment Upgrade Helper introduced.  Have you run that script?   

Do re-call, had some teachers restore older backups to a newer site one time an had to run the upgrades again to fix an issue ... but that was many moons ago so can't remember the particulars/errors, etc.

What would happen if Moodle no longer knew about that plugin?

Do an sql dump of mdl_config_plugins for backup so that when/if you try the following
and find it doesn't work, you can recover.

In mdl_config_plugins there is only one reference to the old mod_assignment

select * from `mdl_config_plugins` where `plugin` like "mod_assignment"

The version value is 2015111600 ... from a 2.7.highest DB

if it were removed?   Try this only after one is sure the Assignment Upgrade Helper ran successfully asn the old is hidden and a plugins overview check shows NO instances anywhere in the site.

And here's one that I know might be impossible to answer at this point, but, when you made the first move from regular to git by chance did any old code creep in there and ya did something like git stash or some other to get by a bump?

Might be time to do a side load of the 2.7 code ... copy to new sideload known addons ... and then switch the code directories making the side load the site - while sill keeping old code.

Trying to get the code to upgrade/update the DB has always been a task.

Then there is also the XML editor ... I looked in a 3.0.highest site (loweest I have at present) and didn't see anything related to mod_assignment ... the old.  Is there in 2.7.x?   Course it's 3AM here and I need some zzzzz's.

'spirit of sharing', Ken