Note: You are currently viewing documentation for Moodle 1.9. Up-to-date documentation for the latest stable version is available here: Sharing Cart/Project Format Errors.

Sharing Cart/Project Format Errors

From MoodleDocs
Revision as of 05:02, 14 April 2010 by Don Hinkelman (talk | contribs)

What to do if you get fatal errors when using the Sharing Cart or Project Course Format

These errors are likely due to third party modules or incomplete installation of Moodle program files. Here is a sample error reported by one user of the Project Format when restoring a section of their course.

Fatal error: Uncaught exception 'SharingCart_ModuleException' with message 'Insertion failure' in /home/xxxx/public_html/course/format/project/shared/SharingCart_Restore.php:302 Stack trace: #0 /home/xxxx/public_html/course/format/project/shared/SharingCart_Restore.php(246): SharingCart_Restore->restoreSection() #1 /home/xxxx/public_html/course/format/project/shared/SharingCart_Restore.php(133): SharingCart_Restore->parseXml() #2 /home/xxxx/public_html/course/format/project/restorelib.php(579): SharingCart_Restore->execute() #3 /home/xxxx/public_html/course/format/project/restore_execute.php(47): project_restore_execute(Object(stdClass), Object(stdClass), Object(stdClass), ) #4 /home/xxxx/public_html/course/format/project/restore.php(154): include_once('/home/xxxx/publ...') #5 {main} thrown in /home/xxxx/public_html/course/format/project/shared/SharingCart_Restore.php on line 302

Our programmer says he has seen this happen once before in someone's site, and it was something occurring outside of the Project Format/Sharing Cart which was breaking backup or restore. The PF/SC both operate with the standard Moodle code for backup and restore. In the previous case, we speculated that the it occurred due to one of the following reasons:

  • an incomplete installation of the Moodle program code
  • a database problem/corruption/incompatibility
  • a third party module that is breaking backup or restore (may have no backup/restore function, or may not be up-to-date with 1.9.8

Most problems we have seen are related to the third one. You might try doing some of the following:

  • turn debugging on to 'All' or 'Developer' level and see what error messages you find
  • try doing standard backup and restore of a course and see if the problem repeats itself
  • see what type of database you are using and version number
  • tell us what third party modules you are using and we can tell you our experience with them
  • set up a new Moodle installation with no third party modules and set up PF/SC to see if it works--then add modules one by one, testing backup and restore