Best practice forum (Archived)

Can't edit a restored course

 
? ?
Can't edit a restored course
by ? ? - Wednesday, 23 May 2012, 12:44 AM
 

Hi,

I restored a backup of a course on our production site and I am unable to edit any of its contents.

In all the edit screens for content it appears as though the edits are being made, but after clicking save and return to course, the updates are NOT applied in the course.

I turned Debug Messages level to Developer and saw these errors on the returning course page screen (after saving changes):

ERROR: syntax error at or near "s" LINE 1: ...0";s:3:"max";N;s:4:"name";s:28:"Station Commander's Activity... ^

UPDATE mdl_course SET modinfo = ...

  • line 1335 of lib/dmllib.php: call to debugging()
  • line 1261 of lib/dmllib.php: call to set_field_select()
  • line 1848 of course/lib.php: call to set_field()
  • line 491 of course/modedit.php: call to rebuild_course_cache()

Could not cache module information for course 'Persons in Police Care or Custody - Supervisors and Managers'!

Error output, so disabling automatic redirect.

( Continue )

Full error code is attached.

Wondering how this can be fixed and where the error is being caused?

Strange thing is that I restored 3 other courses and only this particular course is having problems.

Thanks,

-Ira

? ?
Re: Can't edit a restored course
by ? ? - Thursday, 24 May 2012, 2:42 PM
 

Hi Ira,

It looks like the serialisation of the modinfo cache isn't properly escaping the apostrophe in the part of the course named "Station Commander's Activity".

It's a bug and I'll look at putting a patch together for the next release, and post a patchfile here for you, but as a temporary workaround if you remove that apostrophe it should work.

? ?
Re: Can't edit a restored course
by ? ? - Thursday, 24 May 2012, 3:07 PM
 

Actually it looks like this issue is this bug : https://bugs.totaralms.com/show_bug.cgi?id=9485

It was fixed in Totara versions 1.0.29 and 1.1.7 (released December 21st 2011). With the release of the 2.2 series coming soon, you really are going to be increasingly left behind Ira when it comes to bug fixes and especially new features, unless you can enforce some sort of regular update procedure with your IT department.

? ?
Re: Can't edit a restored course
by ? ? - Thursday, 24 May 2012, 6:57 PM
 

Hi,

I removed the apostrophe in the activity name, which has fixed the editing issue of the course.

I am increasingly aware of how being behind in our Totara versions is causing (already fixed) bugs and issues with our site.

Once our server upgrade is complete i'll be pushing for regular updates to be made to pro-actively address bugs and issues.

thanks

-Ira