Moodle

Restore from backup fails if backup file is from newer version of Moodle

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Won't Fix
  • Affects Version/s: 1.9, 1.9.1
  • Fix Version/s: None
  • Component/s: Backup
  • Labels:
    None
  • Environment:
    All databases, all browsers
  • Affected Branches:
    MOODLE_19_STABLE

Description

When restoring from a backup into a slightly older version of 1.9 the condition "if ($CFG->version < $info->backup_moodle_version && $status)" becomes true, so that a new message() object should be constructed.
The constructor for this object does not seem to exist in 1.9 (possibly deprecated) so that the restore process fails.

Activity

Hide
Ashley Holman added a comment -

Just got hit by this bug. For those interested, I used the hack workaround posted here http://moodle.org/mod/forum/discuss.php?d=102112 - works as a temporary way to ignore the 'message' part.

The other fix is to upgrade your Moodle to the latest 1.9 release.

Show
Ashley Holman added a comment - Just got hit by this bug. For those interested, I used the hack workaround posted here http://moodle.org/mod/forum/discuss.php?d=102112 - works as a temporary way to ignore the 'message' part. The other fix is to upgrade your Moodle to the latest 1.9 release.
Hide
John White added a comment -

I have also noted that the same call for a new message() object exists in version 1.345 of the file (restorelib.php - I didn't cite at the outset) for moodle 1.9.3
So unless the class definition exists elsewhere, the inherent problem is still there and only appears to disappear when you move the destination version up to (or above) the donor version

  • as I indicated above and in the forum discussion Ashley referred to.
Show
John White added a comment - I have also noted that the same call for a new message() object exists in version 1.345 of the file (restorelib.php - I didn't cite at the outset) for moodle 1.9.3 So unless the class definition exists elsewhere, the inherent problem is still there and only appears to disappear when you move the destination version up to (or above) the donor version
  • as I indicated above and in the forum discussion Ashley referred to.
Hide
Michael de Raadt added a comment -

Thanks for reporting this issue.

We have detected that this issue has been inactive for over a year has been recorded as affecting versions that are no longer supported.

If you believe that this issue is still relevant to current versions (2.1 and beyond), please comment on the issue. Issues left inactive for a further month will be closed.

Michael d;

lqjjLKA0p6

Show
Michael de Raadt added a comment - Thanks for reporting this issue. We have detected that this issue has been inactive for over a year has been recorded as affecting versions that are no longer supported. If you believe that this issue is still relevant to current versions (2.1 and beyond), please comment on the issue. Issues left inactive for a further month will be closed. Michael d; lqjjLKA0p6
Hide
Michael de Raadt added a comment -

I'm closing this issue as it appears to have become inactive and is probably not relevant to a current supported version. If you are encountering this problem or one similar, please launch a new issue.

Show
Michael de Raadt added a comment - I'm closing this issue as it appears to have become inactive and is probably not relevant to a current supported version. If you are encountering this problem or one similar, please launch a new issue.

People

Dates

  • Created:
    Updated:
    Resolved: