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

"Notice: Trying to get property 'id' of non-object in /..../backup/restore.php on line 176

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.7.5, 3.8.2
    • 3.7, 3.8, 3.9
    • Backup
    • MOODLE_37_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE
    • MOODLE_37_STABLE, MOODLE_38_STABLE
    • Hide

      Enable asynchronous backup

      1. Log in as admin
      2. Navigate to Courses > Backups > Asynchronous backup/restore in site administration
      3. Tick Enable asynchronous backups and press Save changes

      Create a course backup

      1. Create a new course
      2. Add one or two activities to the course (a couple of labels is enough)
      3. Under Actions menu select Backup
      4. Untick everything except Include activities and resources
      5. Press Jump to final step
      6. Wait for backup to complete
      7. Press Continue
      8. Press Download to save the backup to your local machine

      Restore course backup

      1. Navigate to Courses > Restore course in site administration
      2. Upload the backup file you just created to the Import a backup file and press Restore
      3. Under Restore into an existing course select the same course you previously created
      4. Press Continue
      5. Press Next
      6. Press Next
      7. Press Perform restore
      8. Confirm the URL for the Return to course button is your wwwroot
      9. Confirm you don't see any errors (on screen/in your webserver log) like the following:

        [Fri Dec 06 16:00:29.261177 2019] [php7:notice] [pid 3544] [client 192.168.122.1:47078] PHP Notice:  Trying to get property 'id' of non-object in /opt/moodle/master/src/backup/restore.php on line 176, referer: http://moodle.internal/master/backup/restore.php
        [Fri Dec 06 16:01:14.689945 2019] [php7:notice] [pid 3543] [client 192.168.122.1:47102] PHP Notice:  Trying to get property 'id' of non-object in /opt/moodle/master/src/backup/externallib.php on line 94, referer: http://moodle.internal/master/backup/restore.php

      Show
      Enable asynchronous backup Log in as admin Navigate to Courses > Backups > Asynchronous backup/restore in site administration Tick Enable asynchronous backups and press Save changes Create a course backup Create a new course Add one or two activities to the course (a couple of labels is enough) Under Actions menu select Backup Untick everything except Include activities and resources Press Jump to final step Wait for backup to complete Press Continue Press Download to save the backup to your local machine Restore course backup Navigate to Courses > Restore course in site administration Upload the backup file you just created to the Import a backup file and press Restore Under Restore into an existing course select the same course you previously created Press Continue Press Next Press Next Press Perform restore Confirm the URL for the Return to course button is your wwwroot Confirm you don't see any errors (on screen/in your webserver log) like the following: [Fri Dec 06 16:00:29.261177 2019] [php7:notice] [pid 3544] [client 192.168.122.1:47078] PHP Notice: Trying to get property 'id' of non-object in /opt/moodle/master/src/backup/restore.php on line 176, referer: http://moodle.internal/master/backup/restore.php [Fri Dec 06 16:01:14.689945 2019] [php7:notice] [pid 3543] [client 192.168.122.1:47102] PHP Notice: Trying to get property 'id' of non-object in /opt/moodle/master/src/backup/externallib.php on line 94, referer: http://moodle.internal/master/backup/restore.php

      Analysis...

      The code tries to read $course->id. However, the variable $course is never defined in this file. This was added inĀ MDL-28505

        1. MDL-65649.jpg
          88 kB
          Anna Carissa Sadia

            pholden Paul Holden
            howardsmiller Howard Miller
            Peter Dias Peter Dias
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Anna Carissa Sadia Anna Carissa Sadia
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 hours, 1 minute
                4h 1m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.