Help with: error/xmI_parsing_error

Help with: error/xmI_parsing_error

by Christian Bayly -
Number of replies: 4
Dear All,

Recently I have encountered an error when restoring a backup course onto Moodle site. As soon as I click "Perform Restore" I am getting this error. Other schools who I work with are getting the same error on their sites. We cannot all be doing the same thing wrong and this only just suddenly started to happen.

Is there a bug with Moodle or is there a solution I can put into practice.

Please let me know!
Average of ratings: -
In reply to Christian Bayly

Re: Help with: error/xmI_parsing_error

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Where is your backup file coming from? The obvious problem is that something would be wrong with the file.
Average of ratings: Useful (1)
In reply to Howard Miller

Re: Help with: error/xmI_parsing_error

by Christian Bayly -
No it is a much more interesting situation then simply something wrong with the file. I know this because I can take the exact same backup course (.mbz file) and it will restore perfectly fine on one Moodle system and yet on others it will not. It also is not a Moodle site version issue (3.11.1 or 4.1.1) either as I manage many sites with various versions. The one thing that all of the sites that will not accept the backup file have in common is they are all hosted on the same server company. This is BlueHost. I have a feeling that it may be a server issue and not a file issue as I originally suspected. I am now going through the PHP version, c-panel version etc to find some kind of common denominator that is different from the BlueHost server and the other servers.

Any idea where I should start looking?

Thank you very much!
In reply to Christian Bayly

Re: Help with: error/xmI_parsing_error

by Ken Task -
Picture of Particularly helpful Moodlers
There are at least 3 ways to restore a course ... you've tried only the GUI interface to do so.   Do you have terminal in cPanel?  or ssh access to server where this is happening?   Can you install software - like moosh?

./moodle310//admin/cli/restore_backup.php
./moodle311//admin/cli/restore_backup.php

./moodle40//admin/cli/restore_backup.php
./moodle41//admin/cli/restore_backup.php
./moodle42//admin/cli/restore_backup.php



course-restore

Restore course from path/to/backup.mbz to category or existig course.

Example 1: Restore backup.mbz into category with id=1

moosh course-restore backup.mbz 1

Example 2: Restore backup.mbz into existing course with id=3

moosh course-restore -e backup.mbz 3

Example 3: Ignore pre-check warnings, like restoring backup from higher Moodle version.

moosh course-restore --ignore-warnings backup.mbz 1

Example 4: Restore backup.mbz into existing course with id=3, overwrite course content.

moosh course-restore --overwrite backup.mbz 3

Am not doubting you ... others have reported a xml parsing error on restoring a course.   Attempting a CLI way would be different than GUI.   Still might result in same error, but ... the CLI would bypass any web application firewall your site might have in front of it.   A CLI restore would be just PHP and the DB then - web service taken out of the loop.

Also, does the error show immediately or is there a pause or does it reach a percentage and then error?

Is there in moodledata/temp/backup/ a directory that was used for restoring the course?   Failed restores will leave behind directories with long names and contained in them one should see the various xml files and folders.   One is called moodle_backup.xml and is the road map for the restore.

Also, mind share version of operating system?

and the output of:
php -v
and
php -i
if you have terminal/ssh access to server.

'SoS', Ken

In reply to Christian Bayly

Re: Help with: error/xmI_parsing_error

by Christian Bayly -
Can anyone recommend a good Moodle expert technician to help me resolve this issue for my clients?