Error reading from database

Error reading from database

by Rajeet Singh -
Number of replies: 5

I have tried to uninstall user tour plugin, as soon as I clicked on uninstall button the next screen appeared as "Error reading from database", Now I am only able to see the login page and can login using any user! but not able to access anything after logged in!

Please help...

Average of ratings: -
In reply to Rajeet Singh

Re: Error reading from database

by Ken Task -
Picture of Particularly helpful Moodlers

Tours are part of core code for Moodle.   Probably best not to un-install but to hide in order to avoid un-pleasant/un-expected changes to behavior of Moodle.

Firist, see if the usertours directory is still present in your code directory.

should be in moodlecode/admin/tool/usertours/

IF not ... here's a suggestion .... let's say your code is in /var/www/html/ ... leave that alone and as is.

cd /var/www/ and 'side load' (download) a copy of the version of the code of Moodle you have into a 'sideload' directory.   The copy the sideload/admin/tool/usertours directory to the active code directory in /var/www/html/admin/tool/usertours

Check ownership/permissions on the usertours directory you copied and make sure those match the other directory/file ownerships/permissions.

Then try to login.   Hopefully, Moodle will allow you to login or throw you into an install thing for usertours.

As long as usertours is on ... ie, not hidden ... it applies to all users ... including admins.

So if you do not desire to use it, simply hide it (open eye to closed eye).

'spirit of sharing', Ken


Average of ratings: Useful (1)
In reply to Ken Task

Re: Error reading from database

by Rajeet Singh -

Thanks for your quick response Ken.
The usertours folder is still their inside the tool directory.. but it shows that pr_tool_usertours_tours, pr_tool_usertours_steps tables are missing from the database..
If I import these two table from side loaded database.. then it shown table already exists..
I tries to replace the usertours directory with side loaded one but that shows a fatal error..

What to do know...
Is there any way I can reinstall it..??

In reply to Rajeet Singh

Re: Error reading from database

by Ken Task -
Picture of Particularly helpful Moodlers

Not sure I understand 'sideloaded DB' ... would mean another moodle instance has been installed.

You could drop the tables then use an sql import to re-create them, couldn't you?

Upon installation, both tables have some data in them so you need not only the tables but the original data contained therein.

Reason I asked about if the usertours directory existed is simple ... normally, when one un-installs a plugin, directories are removed and the references/tables in the DB are also removed.  So leave the code directory where it is and work on the DB.

'spirit of sharing', Ken

In reply to Ken Task

Re: Error reading from database

by Rajeet Singh -
yeah, I did import the tables from the other Moodle instance, kept the original data as it is, but that didn't help as well, now it shows the error that these two tables already exists in DB...
if I replace the directory and database both from the new Moodle instance then it shows can't reinitiate some functions.


Regards,

Rajeet Singh

In reply to Rajeet Singh

Odp: Re: Error reading from database

by Kate James -
Hello,

I have the same problem. You have an idea how to solve it?