Coding Error for all Enrolment Plugins

Coding Error for all Enrolment Plugins

by Han Wen Kam -
Number of replies: 7

Moodle 2.7.1 (GA) - working well for a year.

Coding Error* page - Coding error detected, it must be fixed by a programmer: Failed to unserialise data from file. Either failed to read, or failed to write.


When I attempted to create a new course, got a Coding Error*... but course got created.  Then I realised under Enrolment method, its empty.  Attempts to add either manual or self-enrolement method fails with same Coding Error.  I deleted the course.

Under Site Administrations -> Plugins -> Enrolments, Manage Enrolment Plugins and all plugins under it has the same Coding Error*

Under Site Administration -> Notifications also displays the same Coding Error*

What can I do to troubleshoot this further and how can I resolve it please?  

Thank you.

Average of ratings: -
In reply to Han Wen Kam

Re: Coding Error for all Enrolment Plugins

by Justin Hunt -
Picture of Particularly helpful Moodlers Picture of Plugin developers

Coding errors are usually just that. Bugs that need to be fixed. Sometimes they are just hard to find bugs that only appear under certain circumstances. 

What would help here is to know where the bug is, ie in which plugin/module or file. And in general more information about it. You would probably need to look at your web servers error logs for that information.

And also if you made any recent changes to your site, or have any unusual changes to core code.

In reply to Han Wen Kam

Re: Coding Error for all Enrolment Plugins

by Developer@ Monarch Media, Inc. -

Hi,

Would you please provide more information to suggest on this. Please turn on moodle debugging feature and post the error messages displayed after Coding Error sentence.

FYI, to turn on moodle debugging, please go to Site Administration -> Development -> Debugging and change Debug messages to "DEVELOPER: extra Moodle debug messages for developers".

In reply to Developer@ Monarch Media, Inc.

Re: Coding Error for all Enrolment Plugins

by Han Wen Kam -

Thank you for the tip about turning on more detail error message.  I've done it and this is the result when I click on Site Administration -> Plugins -> Enrolment -> Manage enrol plugins:

Debug info: 
Error code: codingerror
Stack trace:
  • line 469 of /cache/stores/file/lib.php: coding_exception thrown
  • line 372 of /cache/stores/file/lib.php: call to cachestore_file->prep_data_after_read()
  • line 299 of /cache/classes/loaders.php: call to cachestore_file->get()
  • line 1454 of /cache/classes/loaders.php: call to cache->get()
  • line 1449 of /lib/moodlelib.php: call to cache_application->get()
  • line 5354 of /lib/adminlib.php: call to get_config()
  • line 1490 of /lib/adminlib.php: call to admin_setting_manageenrols->output_html()
  • line 125 of /admin/settings.php: call to admin_settingpage->output_html()

Is my MariaDB corrupted?  I hope not... sad

In reply to Han Wen Kam

Re: Coding Error for all Enrolment Plugins

by Praveen Chamarthi -
Hi,
you need to replace enrollment related files with original files.it should work.

In reply to Praveen Chamarthi

Re: Coding Error for all Enrolment Plugins

by Han Wen Kam -

Hi John,

I did not alter any of the moodle files under /htdocs... given my current version has not been updated since last June, would upgrading to the latest 2.7.7 help?  Or should I overlay the existing /htdocs with the original 2.7 release I downloaded previously?

If the moodle binaries in /htdocs has been changed... has my server been hacked/compromised?

Appreciate everyone's input thus far, I'm learning more and more about moodle.  Thank you. smile

In reply to Praveen Chamarthi

Re: Coding Error for all Enrolment Plugins

by Han Wen Kam -

Ok, I just did a diff between my current /htdocs and the original /htdocs that I backed up 12 months ago and they are identical.

Anyway, I replaced the current /htdocs with the original /htdocs (first moving the current /htdocs to /htdocs_old and moving the original /htdocs in its place).

Error still showed up, as expected.  sad

In reply to Praveen Chamarthi

Re: Coding Error for all Enrolment Plugins

by Han Wen Kam -

Great NEWS!  Its working again.  smile

I did an upgrade to the latest 2.7.7 (Mar 2015) and everything works again.

I know this may not help identify the original error but an upgrade seems to make this go away so that's good enough for me.