moodle Block type ... has been disabled by the administrator

moodle Block type ... has been disabled by the administrator

by Josiah Carberry -
Number of replies: 5

While trying to recover from a disastrous attempt to upgrade from 3.1 to 3.2, I gave a command to purge all caches, following which the following was displayed:

   Coding error detected, it must be fixed by a programmer: The data source class does not exist.

   More information about this error

After clicking on the More info link, I got:

   Block type ... has been disabled by the administrator

   See the discussion Coding error detected, it must be fixed by a programmer: Block type admin has
    been disabled by the administrator. for a possible cause of the error plus solution.
   Category:

I assume that the following happened, but I have no idea if this is really true: there was a dirty cache sector containing some data relative to a plugin that had been uninstalled. When Moodle tried to write the cached data to disk, it didn't know what to do with it, hence the error.

This is just a hypothesis, as I have no idea what Moodle really does when you purge all caches. Anyway, two questions:

1) If you hypothesis is correct, can I just ignore the error?

2) If my hypothesis is not correct, what is the error all about? What do I need to do?



Average of ratings: -
In reply to Josiah Carberry

Re: moodle Block type ... has been disabled by the administrator

by Josiah Carberry -

4 more bits of information about this issue:

1) I have deleted both cache and localcache, to no effect

2) I am using PHP 5.6

3) I have no definitions in config.php of variables relative to default blocks

4) I now get the following message when purging all caches:

Coding error detected, it must be fixed by a programmer: The data source class does not exist.

Alas, there is no reference to which data source class.


In reply to Josiah Carberry

Re: moodle Block type ... has been disabled by the administrator

by Fred Yankowski -

I am experiencing the same symptoms as what you report above, in much the same situation (reverting to moodle 3.1 after testing 3.2 for a while on a dev machine).

Did you ever find a fix?

In my case the $datasource value that is not found as a class (and hence triggers the error) is "\\core_message\\time_last_message_between_users".

In reply to Fred Yankowski

Re: moodle Block type ... has been disabled by the administrator

by Fred Yankowski -

I just rebuilt the data folder on the dev machine as a fresh copy of the production data, and now "purge all caches" works correctly; the error is gone.

So something in the data folder, not within the cache or localcache folders, seems to have caused the problem. I had searched all recent files in the data folder for any references to "time_last_message_between_users" and found none.

In reply to Fred Yankowski

Re: moodle Block type ... has been disabled by the administrator

by Guido Hornig -
Picture of Plugin developers
I had exactly the same symptoms: "time_last_message_between_users"  class was not found

I discovered it during update to v3.1

but after deleting an old block: learning_plan  - The cache purging worked again.

I can not see any logic but  it worked.



In reply to Josiah Carberry

Re: moodle Block type ... has been disabled by the administrator

by Random Mao -

I was able to work around this by manually deleting the following snippet from <moodledata>/muc/config.php


    'core/message_time_last_message_between_users' =>

    array (

      'mode' => 1,

      'simplekeys' => true,

      'simplevalues' => true,

      'datasource' => '\\core_message\\time_last_message_between_users',

      'component' => 'core',

      'area' => 'message_time_last_message_between_users',

    ),