Non-core contributed modules

Sharing cart fails if the experimental split restore function is enabled

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: 1.9.4
  • Fix Version/s: None
  • Component/s: Block: Sharing cart
  • Labels:
    None
  • Affected Branches:
    MOODLE_19_STABLE

Description

With Admin block->Miscellaneous >experimental>split restore enabled, the following error comes up when trying to restore an item:

Notice: Trying to get property of non-object in E:\Website Files\moodle\blocks\sharing_cart\shared\SharingCart_Restore.php on line 268

exception 'SharingCart_ModuleException' with message 'Insertion failure' in E:\Website Files\moodle\blocks\sharing_cart\shared\SharingCart_Restore.php:280 Stack trace: #0 E:\Website Files\moodle\blocks\sharing_cart\shared\SharingCart_Restore.php(227): SharingCart_Restore->restoreSection() #1 E:\Website Files\moodle\blocks\sharing_cart\shared\SharingCart_Restore.php(119): SharingCart_Restore->parseXml() #2 E:\Website Files\moodle\blocks\sharing_cart\restore.php(43): SharingCart_Restore->execute() #3 {main}

Activity

Hide
Akio Ohnishi added a comment -

Dear Matt

Maybe, split restore function is for 1.9.5.
It is making for 1.9.4+(WEEKLY).
Sorry, Sharing cart for 1.9.4.

Show
Akio Ohnishi added a comment - Dear Matt Maybe, split restore function is for 1.9.5. It is making for 1.9.4+(WEEKLY). Sorry, Sharing cart for 1.9.4.
Hide
Mark Pearson added a comment -

I can confirm that with 1.9.5+ Sharing Cart generates the exception:
exception 'SharingCart_ModuleException' with message 'Insertion failure' in /usr/home/markp/public_html/moo-195/blocks/sharing_cart/shared/SharingCart_Restore.php:283 Stack trace: #0 /usr/home/markp/public_html/moo-195/blocks/sharing_cart/shared/SharingCart_Restore.php(227): SharingCart_Restore->restoreSection() #1 /usr/home/markp/public_html/moo-195/blocks/sharing_cart/shared/SharingCart_Restore.php(119): SharingCart_Restore->parseXml() #2 /usr/home/markp/public_html/moo-195/blocks/sharing_cart/restore.php(44): SharingCart_Restore->execute() #3 {main}
When I switched off Miscellaneous : Experimental : Split restore the copy worked OK. This seems a strange bug and thanks Matt for discovering the workaround.

Show
Mark Pearson added a comment - I can confirm that with 1.9.5+ Sharing Cart generates the exception: exception 'SharingCart_ModuleException' with message 'Insertion failure' in /usr/home/markp/public_html/moo-195/blocks/sharing_cart/shared/SharingCart_Restore.php:283 Stack trace: #0 /usr/home/markp/public_html/moo-195/blocks/sharing_cart/shared/SharingCart_Restore.php(227): SharingCart_Restore->restoreSection() #1 /usr/home/markp/public_html/moo-195/blocks/sharing_cart/shared/SharingCart_Restore.php(119): SharingCart_Restore->parseXml() #2 /usr/home/markp/public_html/moo-195/blocks/sharing_cart/restore.php(44): SharingCart_Restore->execute() #3 {main} When I switched off Miscellaneous : Experimental : Split restore the copy worked OK. This seems a strange bug and thanks Matt for discovering the workaround.
Hide
Akio Ohnishi added a comment -

Dear Mark

Thank you very much for the report.
At present we have no plan of verifying the function when you turn on the
Experimental function in the Sharing Cart.
Henceforth could you please turn off the Experimental function when you use
the sharing cart.
Please let us know if you have any informations regarding this matter.
Thank you very much for your kind cooperation.

Show
Akio Ohnishi added a comment - Dear Mark Thank you very much for the report. At present we have no plan of verifying the function when you turn on the Experimental function in the Sharing Cart. Henceforth could you please turn off the Experimental function when you use the sharing cart. Please let us know if you have any informations regarding this matter. Thank you very much for your kind cooperation.
Hide
Don Hinkelman added a comment -

We are now working to update the Sharing Cart for version 1.9.5+. Currently, we you can download a new version from CVS (release 8, 20090918) which fixes several issues for 1.9.5. However, we still have problems with the Quiz module, which could be related to third party question types which have not been updated to version 1.9.5. Please let us know of any issues or successes you find with this latest release. Thanks! Don

Show
Don Hinkelman added a comment - We are now working to update the Sharing Cart for version 1.9.5+. Currently, we you can download a new version from CVS (release 8, 20090918) which fixes several issues for 1.9.5. However, we still have problems with the Quiz module, which could be related to third party question types which have not been updated to version 1.9.5. Please let us know of any issues or successes you find with this latest release. Thanks! Don
Hide
Mark Pearson added a comment -

I have installed the latest (20100308) version of Sharing cart into Moodle 1.9.9 and still getting this error:

exception 'SharingCart_ModuleException' with message 'Course module record insertion failure' in
/usr/home/markp/public_html/LAE-199/blocks/sharing_cart/shared/SharingCart_
Restore.php:319 Stack trace: #0 /usr/home/markp/public_html/LAE-199/blocks/sharing_cart/shared/SharingCart_
Restore.php(259): SharingCart_Restore->restoreSection() #1 /usr/home/markp/public_html/LAE-199/blocks/sharing_cart/shared/SharingCart_
Restore.php(142): SharingCart_Restore->parseXml() #2 /usr/home/markp/public_html/LAE-199/blocks/sharing_cart/restore.php(44): SharingCart_Restore->execute() #3 {main}

when attempting to copy from the Cart to the course.
It is still linked to Site Administration : Miscellaneous : Experimental -> Experimental split course restore
My understanding from elsewhere is that split course restore is no longer really "experimental" and, in fact, it is the only way that I can successfully restore course backups larger than 128Mb. So I really need this setting switched on for the site. On the other hand the Sharing cart is useless without being about to copy to course, in which case the Split course restore setting needs to be off.

Is there a version of Sharing Cart for Moodle 2.0 that is compatible with Split course restore that I could try backporting to 1.9.9?

Show
Mark Pearson added a comment - I have installed the latest (20100308) version of Sharing cart into Moodle 1.9.9 and still getting this error: exception 'SharingCart_ModuleException' with message 'Course module record insertion failure' in /usr/home/markp/public_html/LAE-199/blocks/sharing_cart/shared/SharingCart_ Restore.php:319 Stack trace: #0 /usr/home/markp/public_html/LAE-199/blocks/sharing_cart/shared/SharingCart_ Restore.php(259): SharingCart_Restore->restoreSection() #1 /usr/home/markp/public_html/LAE-199/blocks/sharing_cart/shared/SharingCart_ Restore.php(142): SharingCart_Restore->parseXml() #2 /usr/home/markp/public_html/LAE-199/blocks/sharing_cart/restore.php(44): SharingCart_Restore->execute() #3 {main} when attempting to copy from the Cart to the course. It is still linked to Site Administration : Miscellaneous : Experimental -> Experimental split course restore My understanding from elsewhere is that split course restore is no longer really "experimental" and, in fact, it is the only way that I can successfully restore course backups larger than 128Mb. So I really need this setting switched on for the site. On the other hand the Sharing cart is useless without being about to copy to course, in which case the Split course restore setting needs to be off. Is there a version of Sharing Cart for Moodle 2.0 that is compatible with Split course restore that I could try backporting to 1.9.9?
Hide
Don Hinkelman added a comment -

Hi Mark,

Thanks for reporting this issue again--frankly I was not aware of the problem until now. At the moment we have not upgraded the Sharing Cart for Moodle 1.9.9 or for 2.0. I am now discussing a possible Sharing Cart 2.0 with Akio now, and will proceed if the cost is in our budget.

So help me understand this better. Am I correct that you are saying ...?

  • the Sharing Cart works fine in Moodle 1.9.9 when the experimental split restore is turned off?
  • You have courses that require experimental split restore in order to do any restore?
  • Experimental split restore is now essential for all course restores when the backup size is over 128mb?
Show
Don Hinkelman added a comment - Hi Mark, Thanks for reporting this issue again--frankly I was not aware of the problem until now. At the moment we have not upgraded the Sharing Cart for Moodle 1.9.9 or for 2.0. I am now discussing a possible Sharing Cart 2.0 with Akio now, and will proceed if the cost is in our budget. So help me understand this better. Am I correct that you are saying ...?
  • the Sharing Cart works fine in Moodle 1.9.9 when the experimental split restore is turned off?
  • You have courses that require experimental split restore in order to do any restore?
  • Experimental split restore is now essential for all course restores when the backup size is over 128mb?
Hide
Mark Pearson added a comment -

Don,

The short answer is yes to all three.
The long answer :
1) Yes, Sharing Cart (copy from Cart to Course) only operates when the Split restore is turned off.
2) Course backups over 128Mb only reliably restore when Split restore is on.

However, I must add that this is not really a show stopper for me. The number of courses > 128Mb that I'm moving to our new site is quite small. So I can manage by remembering to switch on the Split restore when I need it.
All that said, it's a bizarre situation and kudos to Matt for figuring out the workaround.
I do hope that the Sharing Cart makes version 2. It addresses a number of long standing issues in an elegant way.

Show
Mark Pearson added a comment - Don, The short answer is yes to all three. The long answer : 1) Yes, Sharing Cart (copy from Cart to Course) only operates when the Split restore is turned off. 2) Course backups over 128Mb only reliably restore when Split restore is on. However, I must add that this is not really a show stopper for me. The number of courses > 128Mb that I'm moving to our new site is quite small. So I can manage by remembering to switch on the Split restore when I need it. All that said, it's a bizarre situation and kudos to Matt for figuring out the workaround. I do hope that the Sharing Cart makes version 2. It addresses a number of long standing issues in an elegant way.

People

Vote (3)
Watch (2)

Dates

  • Created:
    Updated: