Can not restore a course [error/setting_by_name_not_found]

Can not restore a course [error/setting_by_name_not_found]

by Ahmad ElGazzaz -
Number of replies: 13

Hello,

I have faced this error when restoring a course file with two hosting company and AWS and I don't know the reason. it only worked Moodle Powered by Bitnami in AWS and my computer


I start a course restore normally and after clicking on perform restore this error shows up.

I faced this problem with moodle 3.3 and 3.2.3

The documentation link shows that this page does not exist yeat



Average of ratings: -
In reply to Ahmad ElGazzaz

Re: Can not restore a course [error/setting_by_name_not_found]

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Please turn debugging on and then report back with the full error.

In reply to Emma Richardson

Re: Can not restore a course [error/setting_by_name_not_found]

by Ahmad ElGazzaz -


Debug info:
Error code: setting_by_name_not_found
$a contents: userinfo
Stack trace:
  • line 124 of /backup/util/plan/base_plan.class.php: base_plan_exception thrown
  • line 97 of /backup/util/plan/base_task.class.php: call to base_plan->get_setting()
  • line 106 of /backup/util/plan/base_task.class.php: call to base_task->get_setting()
  • line 2662 of /backup/moodle2/restore_stepslib.php: call to base_task->get_setting_value()
  • line 137 of /backup/util/plan/restore_structure_step.class.php: call to restore_calendarevents_structure_step->process_calendarevents()
  • line 103 of /backup/util/helper/restore_structure_parser_processor.class.php: call to restore_structure_step->process()
  • line 178 of /backup/util/xml/parser/processors/grouped_parser_processor.class.php: call to restore_structure_parser_processor->dispatch_chunk()
  • line 91 of /backup/util/helper/restore_structure_parser_processor.class.php: call to grouped_parser_processor->postprocess_chunk()
  • line 148 of /backup/util/xml/parser/processors/simplified_parser_processor.class.php: call to restore_structure_parser_processor->postprocess_chunk()
  • line 92 of /backup/util/xml/parser/processors/progressive_parser_processor.class.php: call to simplified_parser_processor->process_chunk()
  • line 190 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser_processor->receive_chunk()
  • line 278 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser->publish()
  • line ? of unknownfile: call to progressive_parser->end_tag()
  • line 179 of /backup/util/xml/parser/progressive_parser.class.php: call to xml_parse()
  • line 158 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser->parse()
  • line 110 of /backup/util/plan/restore_structure_step.class.php: call to progressive_parser->process()
  • line 181 of /backup/util/plan/base_task.class.php: call to restore_structure_step->execute()
  • line 178 of /backup/util/plan/base_plan.class.php: call to base_task->execute()
  • line 167 of /backup/util/plan/restore_plan.class.php: call to base_plan->execute()
  • line 339 of /backup/controller/restore_controller.class.php: call to restore_plan->execute()
  • line 224 of /backup/util/ui/restore_ui.class.php: call to restore_controller->execute_plan()
  • line 111 of /backup/restore.php: call to restore_ui->execute()

In reply to Ahmad ElGazzaz

Re: Can not restore a course [error/setting_by_name_not_found]

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hello,

Do you have a single activity backup and are you attempting to restore it to a new course? If so, the error message is reported in MDL-24342. Can you try restoring it into an existing course (which can be newly created and empty)?

In reply to Helen Foster

Re: Can not restore a course [error/setting_by_name_not_found]

by Ahmad ElGazzaz -

This backup contains attendance, forums, files and some pages

I tried to restore it into a course but I got the same result.

In reply to Ahmad ElGazzaz

Re: Can not restore a course [error/setting_by_name_not_found]

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Is this a backup from an older version of Moodle?  Or a newer version?  Was user data included in the backup and are you trying to restore user data?

In reply to Emma Richardson

Re: Can not restore a course [error/setting_by_name_not_found]

by Ahmad ElGazzaz -
Both are Moodle 3.3 (Build: 20170515) and I faced different errors when it contained user data so I removed it.

The source of the backup was 3.2 upgraded to 3.3 when it was released.
In reply to Ahmad ElGazzaz

Re: Can not restore a course [error/setting_by_name_not_found]

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Can you try creating a backup without the attendance activity, as another possible reason for the error is restoring a backup containing plugin data which is not expected on the destination site.

In reply to Helen Foster

Re: Can not restore a course [error/setting_by_name_not_found]

by Colin Napier -

I am having this same issue. It happens both when restoring a backup of the course, or when trying to import from the course into an empty one. It only occurs on this one course so I am fairly certain it is a piece of data within the course. 


We are running 3.3 and our only custom plugin is HotPot


error/setting_by_name_not_found

More information about this error

×Debug info: 
Error code: setting_by_name_not_found
$a contents: userinfo
×Stack trace:
  • line 124 of /backup/util/plan/base_plan.class.php: base_plan_exception thrown
  • line 97 of /backup/util/plan/base_task.class.php: call to base_plan->get_setting()
  • line 106 of /backup/util/plan/base_task.class.php: call to base_task->get_setting()
  • line 2662 of /backup/moodle2/restore_stepslib.php: call to base_task->get_setting_value()
  • line 137 of /backup/util/plan/restore_structure_step.class.php: call to restore_calendarevents_structure_step->process_calendarevents()
  • line 103 of /backup/util/helper/restore_structure_parser_processor.class.php: call to restore_structure_step->process()
  • line 178 of /backup/util/xml/parser/processors/grouped_parser_processor.class.php: call to restore_structure_parser_processor->dispatch_chunk()
  • line 91 of /backup/util/helper/restore_structure_parser_processor.class.php: call to grouped_parser_processor->postprocess_chunk()
  • line 148 of /backup/util/xml/parser/processors/simplified_parser_processor.class.php: call to restore_structure_parser_processor->postprocess_chunk()
  • line 92 of /backup/util/xml/parser/processors/progressive_parser_processor.class.php: call to simplified_parser_processor->process_chunk()
  • line 190 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser_processor->receive_chunk()
  • line 278 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser->publish()
  • line ? of unknownfile: call to progressive_parser->end_tag()
  • line 179 of /backup/util/xml/parser/progressive_parser.class.php: call to xml_parse()
  • line 158 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser->parse()
  • line 110 of /backup/util/plan/restore_structure_step.class.php: call to progressive_parser->process()
  • line 181 of /backup/util/plan/base_task.class.php: call to restore_structure_step->execute()
  • line 178 of /backup/util/plan/base_plan.class.php: call to base_task->execute()
  • line 167 of /backup/util/plan/restore_plan.class.php: call to base_plan->execute()
  • line 339 of /backup/controller/restore_controller.class.php: call to restore_plan->execute()
  • line 162 of /backup/import.php: call to restore_controller->execute_plan()

Any help would be much appreciated

In reply to Colin Napier

Re: Can not restore a course [error/setting_by_name_not_found]

by Dave Balch -

I've encountered this as well - it looks like it's the problem described in MDL-59011.

Cherry-picking the fix for that fixed it on my M3.3 installation.

Average of ratings: Useful (6)
In reply to Dave Balch

Re: Can not restore a course [error/setting_by_name_not_found]

by Colin Napier -

Happy days! Well spotted sir.

I think rather than patch I will wait for 3.3.1 as the requirement to import is not urgent. 

Thanks again smile

In reply to Dave Balch

Re: Can not restore a course [error/setting_by_name_not_found]

by Ahmad ElGazzaz -

I have given up built the whole course again.

Thank you for your help.

In reply to Dave Balch

Re: Can not restore a course [error/setting_by_name_not_found] [Solved]

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Many thanks Dave for pointing out MDL-59011. I've made a note of it in the documentation.

In reply to Dave Balch

Re: Can not restore a course [error/setting_by_name_not_found]

by Nadav Kavalerchik -
Picture of Core developers Picture of Plugin developers Picture of Testers Picture of Translators

Thanks! solved our issue as well. (Restoring a course including core Moodle modules, from v3.1 to v3.3)