Reputation: 442
I am getting an error while i am trying to restore a course backup. Can anyone help me out. Error i am getting is bellow.
Coding error detected, it must be fixed by a programmer: Invalid ->cf for profile condition
More information about this error
Debug info:
Error code: codingerror
Stack trace:
o line 120 of /availability/condition/profile/classes/condition.php: coding_exception thrown
o line 234 of /availability/classes/tree.php: call to availability_profile\condition->__construct()
o line 144 of /availability/classes/info.php: call to core_availability\tree->__construct()
o line 114 of /availability/classes/info.php: call to core_availability\info->decode_availability()
o line 318 of /availability/classes/info.php: call to core_availability\info->get_availability_tree()
o line 823 of /backup/moodle2/restore_stepslib.php: call to core_availability\info->update_after_restore()
o line 34 of /backup/util/plan/restore_execution_step.class.php: call to restore_update_availability->define_execution()
o line 181 of /backup/util/plan/base_task.class.php: call to restore_execution_step->execute()
o line 177 of /backup/util/plan/base_plan.class.php: call to base_task->execute()
o line 167 of /backup/util/plan/restore_plan.class.php: call to base_plan->execute()
o line 333 of /backup/controller/restore_controller.class.php: call to restore_plan->execute()
o line 224 of /backup/util/ui/restore_ui.class.php: call to restore_controller->execute_plan()
o line 111 of /backup/restore.php: call to restore_ui->execute()
Can anyone know about how to fix this error.
Upvotes: 1
Views: 3727
Reputation: 10241
From the error : /availability/condition/profile/classes/condition.php
I'm guessing there is custom profile field missing.
Look in site admin -> users -> accounts -> user profile fields
Does the list of fields match on both the old system and the new system?
Upvotes: 2
Reputation: 2644
Backups of different moodle versions and moodle instances/systems could not be 100% compatible. Try to restore the backup in the same moodle version, then update moodle to your current version, backup and restore into your production environment from the updated moodle system.
Upvotes: 1