Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-27820

Problem with ratings breaking forum/glossary/database backups with user data

    Details

    • Testing Instructions:
      Hide

      1) Make one backup of course having forum/data/glossary ratings
      2) TEST: Backup ends without error
      3) Look to generated xml files within the mbz (zip) file.
      4) TEST: <ratings> are there

      Show
      1) Make one backup of course having forum/data/glossary ratings 2) TEST: Backup ends without error 3) Look to generated xml files within the mbz (zip) file. 4) TEST: <ratings> are there
    • Affected Branches:
      MOODLE_21_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      When I try to backup my test course, which contains an empty News forum, with default options, I get

      error/baseelementincorrectfinalorattribute
       
      More information about this error
      Stack trace:
       
          line 125 of /backup/util/structure/base_final_element.class.php: base_element_struct_exception thrown
          line 251 of /backup/util/structure/backup_nested_element.class.php: call to base_final_element->find_element_by_path()
          line 237 of /backup/util/structure/backup_nested_element.class.php: call to backup_nested_element->find_element()
          line 231 of /backup/util/structure/backup_nested_element.class.php: call to backup_nested_element->convert_sql_params()
          line 127 of /backup/util/structure/backup_nested_element.class.php: call to backup_nested_element->convert_table_params()
          line 131 of /mod/forum/backup/moodle2/backup_forum_stepslib.php: call to backup_nested_element->set_source_table()
          line 86 of /backup/util/plan/backup_structure_step.class.php: call to backup_forum_activity_structure_step->define_structure()
          line 153 of /backup/util/plan/base_task.class.php: call to backup_structure_step->execute()
          line 178 of /backup/moodle2/backup_activity_task.class.php: call to base_task->execute()
          line 148 of /backup/util/plan/base_plan.class.php: call to backup_activity_task->execute()
          line 105 of /backup/util/plan/backup_plan.class.php: call to base_plan->execute()
          line 293 of /backup/controller/backup_controller.class.php: call to backup_plan->execute()
          line 111 of /backup/util/ui/backup_ui.class.php: call to backup_controller->execute_plan()
          line 87 of /backup/backup.php: call to backup_ui->execute()

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Oh, crap. Yes! It was introduced 2 weeks ago by MDL-27471!

            I commented that with SamH last week, needing to enclose those literal params with backup_helper::is_sqlparam(), in fact I think I told him I was going to do the change, but with all the integration maremagnum I completely missed that! My fault!

            So this will be fixed for forum/glossary/data ASAP. Thanks!

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Oh, crap. Yes! It was introduced 2 weeks ago by MDL-27471 ! I commented that with SamH last week, needing to enclose those literal params with backup_helper::is_sqlparam(), in fact I think I told him I was going to do the change, but with all the integration maremagnum I completely missed that! My fault! So this will be fixed for forum/glossary/data ASAP. Thanks!
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            (auto-integration is not a recommended habit, but this is trivial and better if lands for weekly)

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - (auto-integration is not a recommended habit, but this is trivial and better if lands for weekly)
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            integrated, self-thanks!

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - integrated, self-thanks!
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            test passed, re-self-thanks!

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - test passed, re-self-thanks!
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Upstream, upstream, this is part of upstream, upstream... thanks!

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Upstream, upstream, this is part of upstream, upstream... thanks!

              People

              • Assignee:
                stronk7 Eloy Lafuente (stronk7)
                Reporter:
                timhunt Tim Hunt
                Integrator:
                Eloy Lafuente (stronk7)
                Tester:
                Eloy Lafuente (stronk7)
                Participants:
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  1/Jul/11