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

Missing out the 'general' section in a backup causes errors after restore

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Component/s: Backup
    • Labels:
      None
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      1. Create a backup of a course
      2. Untick the 'general' section (section 0), when choosing which activities to backup
      3. Restore this backup (either to a new course, or deleting the content of an old course).
      4. View the newly restored course (with error display switched on).

      Following errors occur (just under 'Topics Outline'):
      Notice: Undefined offset: 0 in /home/davo/public_html/moodle20/course/format/topics/format.php on line 91
      Notice: Trying to get property of non-object in /home/davo/public_html/moodle20/course/format/topics/format.php on line 94
      Notice: Trying to get property of non-object in /home/davo/public_html/moodle20/course/format/topics/format.php on line 94

      Followed by further errors in section 0:
      Notice: Trying to get property of non-object in /home/davo/public_html/moodle20/course/format/topics/format.php on line 102
      Notice: Trying to get property of non-object in /home/davo/public_html/moodle20/course/format/topics/format.php on line 108
      Notice: Trying to get property of non-object in /home/davo/public_html/moodle20/course/format/topics/format.php on line 108
      Notice: Trying to get property of non-object in /home/davo/public_html/moodle20/course/format/topics/format.php on line 111
      Notice: Trying to get property of non-object in /home/davo/public_html/moodle20/course/format/topics/format.php on line 115

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Hi Davo,

            thanks for the report! One simple question:

            Can you confirm that, if you turn on edition and then turn it off the warnings disappear?

            TIA and ciao

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Hi Davo, thanks for the report! One simple question: Can you confirm that, if you turn on edition and then turn it off the warnings disappear? TIA and ciao
            Hide
            davosmith Davo Smith added a comment -

            Turning editing on/off does not make the warnings disappear.

            Adding something to section 0 (in my case a forum), does fix the warning message.

            Show
            davosmith Davo Smith added a comment - Turning editing on/off does not make the warnings disappear. Adding something to section 0 (in my case a forum), does fix the warning message.
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Thanks Davo!

            It should be fixed now, and any missing section is now created to avoid those warnings.

            Changes are already in cvs/git and also will be available in next Wednesday weekly.

            Resolving as fixed, ciao

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Thanks Davo! It should be fixed now, and any missing section is now created to avoid those warnings. Changes are already in cvs/git and also will be available in next Wednesday weekly. Resolving as fixed, ciao

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  24/Nov/10