Backup Error. Error code: multiple_optigroup_duplicate_element

Backup Error. Error code: multiple_optigroup_duplicate_element

by Erick Christian -
Number of replies: 4

We currently perform nightly site backups, and that's great in case of catastrophe, but doesn't help us if a teacher loses their course for whatever reason. So I setup automated backups to a remote location on our development Moodle site just to get  a feel for things before going live with it. I started with a stripped down server, created just two test courses as to serve my purpose and hit a snag early on. The main page (courseid 1) has no issues backing up, but both of my test courses have resulted in errors consistently for the last three days. For troubleshooting purposes I've attempted to manually back them up to no avail as well. I have attempted this both via CLI and directly through the Moodle interface.

I'd like to thank anyone upfront for any help provided. I'm eager to get this off the ground.

This should be all the pertinent info, but if I've missed something just ask!

  • Running Moodle locally on a virtualized LAMP stack
  • Ubuntu 14.04.1
  • Apache 2.4.7
  • MySQL 5.5.41
  • PHP 5.5.9
  • Moodle 2.7.1
sudo php /var/www/moodle/admin/cli/backup.php --courseid=2 --destination=/mnt/moodle-backups/devcourses/ErickTest
instantiating backup controller 19b71049ad095dc68b8d6290d6224731
setting controller status to 100
loading controller plan
setting controller status to 300
applying plan defaults
setting controller status to 400
setting file inclusion to 1
checking plan security
setting controller status to 500
setting controller status to 700
saving controller to db
calculating controller checksum 2380a152350977f9d0beda6e0163b904
loading controller from db
setting controller status to 800
Default exception handler: error/multiple_optigroup_duplicate_element Debug:
Error code: multiple_optigroup_duplicate_element
$a contents: feedback_file
* line 144 of /backup/util/structure/base_optigroup.class.php: base_optigroup_exception thrown
* line 108 of /backup/util/structure/base_nested_element.class.php: call to base_optigroup->add_used()
* line 173 of /backup/util/structure/base_nested_element.class.php: call to base_nested_element->check_and_set_used()
* line 48 of /mod/assign/feedback/onenote/backup/moodle2/backup_assignfeedback_onenote_subplugin.class.php: call to base_nested_element->add_child()
* line 60 of /backup/moodle2/backup_subplugin.class.php: call to backup_assignfeedback_onenote_subplugin->define_grade_subplugin_structure()
* line 137 of /backup/moodle2/backup_stepslib.php: call to backup_subplugin->define_subplugin_structure()
* line 138 of /mod/assign/backup/moodle2/backup_assign_stepslib.php: call to backup_activity_structure_step->add_subplugin_structure()
* line 88 of /backup/util/plan/backup_structure_step.class.php: call to backup_assign_activity_structure_step->define_structure()
* line 181 of /backup/util/plan/base_task.class.php: call to backup_structure_step->execute()
* line 211 of /backup/moodle2/backup_activity_task.class.php: call to base_task->execute()
* line 177 of /backup/util/plan/base_plan.class.php: call to backup_activity_task->execute()
* line 120 of /backup/util/plan/backup_plan.class.php: call to base_plan->execute()
* line 320 of /backup/controller/backup_controller.class.php: call to backup_plan->execute()
* line 100 of /admin/cli/backup.php: call to backup_controller->execute_plan() Potential coding error - existing temptables found when disposing database. Must be dropped!


Thanks again and best regards,

Erick

Average of ratings: -
In reply to Erick Christian

Re: Backup Error. Error code: multiple_optigroup_duplicate_element

by Tony Box -

Hi Erick,

I'm having the same problem over here. We have a custom backup/restore script that lets us easily choose which courses to backup and restore. I'm trying to do of my test courses and I'm getting the same errors as you. I see we are both using the OneNote feedback plugin... maybe that is what is causing the error?


We are running 2.8.3+ on CentOS. PHP 5.5.21.


instantiating backup controller 949c176b9d9d8c9119958354399e7c3a
setting controller status to 100
loading controller plan
setting controller status to 300
applying plan defaults
setting controller status to 400
setting file inclusion to 1
checking plan security
setting controller status to 700
saving controller to db
calculating controller checksum 7a4dea113597af626a32a2ab0e928b67
loading controller from db
setting controller status to 700
saving controller to db
calculating controller checksum 0eaf8be91a82ed4c36a3b0628ac72a96
loading controller from db
setting controller status to 800
Default exception handler: error/multiple_optigroup_duplicate_element Debug:
Error code: multiple_optigroup_duplicate_element
$a contents: feedback_file
* line 144 of /backup/util/structure/base_optigroup.class.php: base_optigroup_exception thrown
* line 108 of /backup/util/structure/base_nested_element.class.php: call to base_optigroup->add_used()
* line 173 of /backup/util/structure/base_nested_element.class.php: call to base_nested_element->check_and_set_used()
* line 48 of /mod/assign/feedback/onenote/backup/moodle2/backup_assignfeedback_onenote_subplugin.class.php: call to base_nested_element->add_child()
* line 60 of /backup/moodle2/backup_subplugin.class.php: call to backup_assignfeedback_onenote_subplugin->define_grade_subplugin_structure()
* line 137 of /backup/moodle2/backup_stepslib.php: call to backup_subplugin->define_subplugin_structure()
* line 139 of /mod/assign/backup/moodle2/backup_assign_stepslib.php: call to backup_activity_structure_step->add_subplugin_structure()
* line 88 of /backup/util/plan/backup_structure_step.class.php: call to backup_assign_activity_structure_step->define_structure()
* line 181 of /backup/util/plan/base_task.class.php: call to backup_structure_step->execute()
* line 214 of /backup/moodle2/backup_activity_task.class.php: call to base_task->execute()
* line 177 of /backup/util/plan/base_plan.class.php: call to backup_activity_task->execute()
* line 120 of /backup/util/plan/backup_plan.class.php: call to base_plan->execute()
* line 320 of /backup/controller/backup_controller.class.php: call to backup_plan->execute()
* line 100 of /home/deploy/moodle-autobr/backup.php: call to backup_controller->execute_plan()

!!! error/multiple_optigroup_duplicate_element !!!
!!
Error code: multiple_optigroup_duplicate_element
$a contents: feedback_file !!
!! Stack trace: * line 144 of /backup/util/structure/base_optigroup.class.php: base_optigroup_exception thrown
* line 108 of /backup/util/structure/base_nested_element.class.php: call to base_optigroup->add_used()
* line 173 of /backup/util/structure/base_nested_element.class.php: call to base_nested_element->check_and_set_used()
* line 48 of /mod/assign/feedback/onenote/backup/moodle2/backup_assignfeedback_onenote_subplugin.class.php: call to base_nested_element->add_child()
* line 60 of /backup/moodle2/backup_subplugin.class.php: call to backup_assignfeedback_onenote_subplugin->define_grade_subplugin_structure()
* line 137 of /backup/moodle2/backup_stepslib.php: call to backup_subplugin->define_subplugin_structure()
* line 139 of /mod/assign/backup/moodle2/backup_assign_stepslib.php: call to backup_activity_structure_step->add_subplugin_structure()
* line 88 of /backup/util/plan/backup_structure_step.class.php: call to backup_assign_activity_structure_step->define_structure()
* line 181 of /backup/util/plan/base_task.class.php: call to backup_structure_step->execute()
* line 214 of /backup/moodle2/backup_activity_task.class.php: call to base_task->execute()
* line 177 of /backup/util/plan/base_plan.class.php: call to backup_activity_task->execute()
* line 120 of /backup/util/plan/backup_plan.class.php: call to base_plan->execute()
* line 320 of /backup/controller/backup_controller.class.php: call to backup_plan->execute()
* line 100 of /home/deploy/moodle-autobr/backup.php: call to backup_controller->execute_plan()
 !!
Potential coding error - existing temptables found when disposing database. Must be dropped!



In reply to Erick Christian

Re: Backup Error. Error code: multiple_optigroup_duplicate_element

by Tony Box -

Okay I just uninstalled the onenote feedback plugin and it seems to be working now!

Looks like we need to report this bug to the onenote team. I'll go ahead and do that on github.

In reply to Tony Box

Re: Backup Error. Error code: multiple_optigroup_duplicate_element

by Erick Christian -
Good catch Tony! I never tried that. In fact, I found that the issue had to do with backing up users and personal information. After unchecking "include users" my issues went away. We typically don't care much about the user data anyway, just the framework of the course. However, I will remember this and try it out when I have some free time. Thanks for the tip!


-Erick