× Joomdle 1.0 Installation

Health Check Fail with Database Error

6 months 4 weeks ago
act242
Posts: 3
More
Topic Author
Health Check Fail with Database Error #1
Good morning -

I have tried multiple times to install on Joomla 3.9.2 running PHP 7.1. I get the following in the health check:

An unexpected error happened: 23604497: Can not find data record in database table external_functions. | ERRORCODE: invalidrecord

Additionally, when I installed Joomdle on Moodle, I get the following:

Exception - Call to undefined method cache_disabled::purge_current_user()

×Debug info:
Error code: generalexceptionmessage
×Stack trace:
line 131 of /user/lib.php: Error thrown
line 81 of /auth/joomdle/db/install.php: call to user_create_user()
line 29 of /auth/joomdle/db/install.php: call to joomdle_moodle_config->create_user()
line 610 of /lib/upgradelib.php: call to xmldb_auth_joomdle_install()
line 1852 of /lib/upgradelib.php: call to upgrade_plugins()
line 694 of /admin/index.php: call to upgrade_noncore()

Thanks!

-Reuel+
6 months 4 weeks ago
Antonio Durán
Posts: 6945
More
Health Check Fail with Database Error #2
Hi.

Something strange must be going on with your Moodle installtion, as Joomdle code does not call purge_current_user. It is Moodle calling it in its code...
Which Moodle version are you running?
You could try manually deleting the joomdle_connector user in Moodle, if it was created. Then try to install again.
6 months 4 weeks ago
act242
Posts: 3
More
Topic Author
Health Check Fail with Database Error #3
I am using Moodle 3.6

I have uninstalled Moodle 3 times - including deleting the database. I get the same error every time.
6 months 3 weeks ago
Antonio Durán
Posts: 6945
More
Health Check Fail with Database Error #4
Do other extensions install fine?

Looking at the code, these seems to be executed only when cache is disabled in Moodle...you could try enabling it.
6 months 3 weeks ago
leonstr
Posts: 1
More
Health Check Fail with Database Error #5
The error installing Joomdle ("Exception - Call to undefined method cache_disabled::purge_current_user()") was reported on the Moodle forum k. It might be a Moodle bug ( MDL-64719 k).
Both links contain a potential fix for anyone comfortable changing their Moodle site's source code.
6 months 3 weeks ago
Antonio Durán
Posts: 6945
More
Health Check Fail with Database Error #6
Great, thanks for t he info.
6 months 3 weeks ago
act242
Posts: 3
More
Topic Author
Health Check Fail with Database Error #7
Installed the code as recommended by Moodle. Works like a charm.

Here are the instructions:

If you're comfortable editing your site's source code you can make the following change to the function user_create_user() in user/lib.php, looking for the following lines (should be lines 129 to 131:

// Purge the associated caches for the current user only.
$presignupcache = \cache::make('core', 'presignup');
$presignupcache->purge_current_user();
and changing the last line so this becomes:

// Purge the associated caches for the current user only.
$presignupcache = \cache::make('core', 'presignup');

if (get_class($presignupcache) !== 'cache_disabled') {
$presignupcache->purge_current_user();
}
6 months 3 weeks ago
Antonio Durán
Posts: 6945
More
Health Check Fail with Database Error #8
Nice, thanks for the feedback.
5 months 2 weeks ago
thefluffyshrimp
Posts: 6
More
Health Check Fail with Database Error #9
Hello!

I followed the instructions as outlined, but I keep getting an error message under System Check > Joomdle Web Services. Although this time the error message seems to have updated a bit with more information:

An unexpected error happened: 23604497: Can not find data record in database table external_functions. | DEBUG INFO: SELECT * FROM {external_functions} WHERE name = ? [array ( 0 => 'joomdle_system_check', )] | ERRORCODE: invalidrecord

My server is running off PHP version 7.2.13, and I am using Joomla 3.9.3 (Stable) and Moodle 3.6.2 (Stable) with Joomdle 1.2.3 and xmlrpc-epi v. 0.51.

Any thoughts on what might be going on?

Thank you so very much for your help!
Best Regards,
Krisha
Cron Job Starts