Table "resource_old" doesn't exist

Re: Table "resource_old" doesn't exist

by Eloy Lafuente (stronk7) -
Number of replies: 3
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi Visvanath,

the "resource_old" table is a must-exist table in every Moodle site. It's used to keep the track of some (pre 2.0) Moodle resources information, but no matter of that it must exist in every site. Or you will run under problems.

My bet is that the table has been dropped in your site (by mistake), and that's leading to the restore problems. The solution, to recreate it.

Ideally from a DB backup where it was still present, especially if your site comes from 1.x days or, alternatively, by hand (the SQL commands to create it manually can be found in the Site admin -> developer -> XMLDB Editor -> mod/resource/db (load and edit) -> resource_old -> View SQL code).

Ciao smile

Average of ratings: Useful (2)
In reply to Eloy Lafuente (stronk7)

Re: Table "resource_old" doesn't exist

by Albert Ramsbottom -

I have this problem, I have recreated the table in MSSQL but the same error is occurring.


The only thing I can think off is that all the tables are appended by mdl.tablename, but when I recreate the table it is appended by username.mdl.tablename

Any ideas peeps

Thanks

In reply to Albert Ramsbottom

Re: Table "resource_old" doesn't exist

by Albert Ramsbottom -

OK I changed the schema and the table was created successfully

But I now get the following error


error/cannot_finish_ui_if_not_setting_ui

More information about this error

Debug info:
Error code: cannot_finish_ui_if_not_setting_ui
$a contents:
Stack trace:
  • line 165 of \backup\controller\backup_controller.class.php: backup_controller_exception thrown
  • line 110 of \backup\util\ui\backup_ui.class.php: call to backup_controller->finish_ui()
  • line 131 of \backup\backup.php: call to backup_ui->execute()

Cheers

In reply to Albert Ramsbottom

Re: Table "resource_old" doesn't exist

by Albert Ramsbottom -

Fixed

The error occurred because I was trying to rerun a backup by pressing the back button rather than going to a new course and starting afresh

Thanks