Issue Details (XML | Word | Printable)

Key: MDL-13554
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Critical Critical
Assignee: Eloy Lafuente (stronk7)
Reporter: Mark Nielsen
Votes: 0
Watchers: 1
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

Block restore for modules can fail or insert invalid block_instance records

Created: 21/Feb/08 04:52 AM   Updated: 21/Feb/08 02:36 PM
Return to search
Component/s: Backup
Affects Version/s: 1.8.4
Fix Version/s: 1.8.5, 1.9

File Attachments: 1. File restorelib.diff (0.6 kB)


Participants: Eloy Lafuente (stronk7), Mark Nielsen and Martin Dougiamas
Security Level: None
Resolved date: 21/Feb/08
Affected Branches: MOODLE_18_STABLE
Fixed Branches: MOODLE_18_STABLE, MOODLE_19_STABLE


 Description  « Hide
In the backup process, all block from all modules are backed up regardless if the module has been selected for backup. So, during the restore process, the block restore code never checks to see if the pageid remaps correctly. This results in the pageid being set to NULL, causing the restore to fail, or the pageid being set to 0, creating an invalid block_instance record.

Attached is a fix in the restore process. A further fix would be to only backup those blocks that belong to modules that are actually being backed up. Regardless though, I think the attached patch should be added to restorelib.php.

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Martin Dougiamas made changes - 21/Feb/08 02:29 PM
Field Original Value New Value
Assignee Martin Dougiamas [ dougiamas ] Eloy Lafuente (stronk7) [ stronk7 ]
Martin Dougiamas made changes - 21/Feb/08 02:36 PM
Resolution Fixed [ 1 ]
Status Open [ 1 ] Resolved [ 5 ]
Martin Dougiamas made changes - 21/Feb/08 02:36 PM
Fix Version/s 2.0 [ 10122 ]