Wiki tabs disappeared

Work Photo 2014
Wiki tabs disappeared

Moodle 2.4.7+ (Build: 20131129) on Ubuntu 10.04

I have a very strange issue which appeared in the last week or so.   I wonder if it is some kind of database corruption as I haven't made any system changes lately.  When I view a wiki (any wiki created since upgrade moodle2 several months ago I think) I am redirected to 'create.php' as though the wiki had no pages and  there are no editing tabs (edit/view.../administration).  (attached image)

In fact, the wiki has several pages.  It was set up as 'individual wiki' for students and I can use page id in the URL to view a wiki page, which looks fine and has all the tabs (edit/view.../administration) (attached image)

I have tried replacing the folder /moodle/mod/wiki with a fresh version from a clean moodle 2.4 install but this didn't help.

I thought I would try backing up and restoring the wiki to a new course.  All went well until restore when I got the error below.

All suggestions welcomed! Thanks, Carol

Error writing to database

Debug info: Duplicate entry '54-0-827' for key 'mdl_wikisubw_wikgrouse_uix'
INSERT INTO mdl_wiki_subwikis (groupid,userid,wikiid) VALUES(?,?,?)
[array (
0 => 0,
1 => '827',
2 => 54,
Error code: dmlwriteexception
Stack trace:
  • line 429 of /lib/dml/moodle_database.php: dml_write_exception thrown
  • line 1107 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
  • line 1149 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()
  • line 80 of /mod/wiki/backup/moodle2/restore_wiki_stepslib.php: call to mysqli_native_moodle_database->insert_record()
  • line 131 of /backup/util/plan/restore_structure_step.class.php: call to restore_wiki_activity_structure_step->process_wiki_subwiki()
  • line 103 of /backup/util/helper/restore_structure_parser_processor.class.php: call to restore_structure_step->process()
  • line 151 of /backup/util/xml/parser/processors/grouped_parser_processor.class.php: call to restore_structure_parser_processor->dispatch_chunk()
  • line 91 of /backup/util/helper/restore_structure_parser_processor.class.php: call to grouped_parser_processor->postprocess_chunk()
  • line 148 of /backup/util/xml/parser/processors/simplified_parser_processor.class.php: call to restore_structure_parser_processor->postprocess_chunk()
  • line 92 of /backup/util/xml/parser/processors/progressive_parser_processor.class.php: call to simplified_parser_processor->process_chunk()
  • line 169 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser_processor->receive_chunk()
  • line 212 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser->publish()
  • line ? of unknownfile: call to progressive_parser->start_tag()
  • line 158 of /backup/util/xml/parser/progressive_parser.class.php: call to xml_parse()
  • line 137 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser->parse()
  • line 105 of /backup/util/plan/restore_structure_step.class.php: call to progressive_parser->process()
  • line 153 of /backup/util/plan/base_task.class.php: call to restore_structure_step->execute()
  • line 192 of /backup/moodle2/restore_activity_task.class.php: call to base_task->execute()
  • line 163 of /backup/util/plan/base_plan.class.php: call to restore_activity_task->execute()
  • line 157 of /backup/util/plan/restore_plan.class.php: call to base_plan->execute()
  • line 315 of /backup/controller/restore_controller.class.php: call to restore_plan->execute()
  • line 147 of /backup/util/ui/restore_ui.class.php: call to restore_controller->execute_plan()
  • line 46 of /backup/restore.php: call to restore_ui->execute()

I have some wikis created before I upgraded to Moodle 2 and these seem to be OK but all newer wikis seem to have this issue.

Average of ratings: -
Work Photo 2014
Re: Wiki tabs disappeared


Thanks to Tatsuya Shirai  in, I was able to take a backup of the wiki and import the xml file into Excel to retrieve the wiki entries.  Looking at the file, I can see that the entries refer to a group ID which no longer exists in the course (groups were deleted and re-created) so I suspect that this is the cause of the problem with viewing the wiki.  Now... any suggestions on how to fix this?

thanks! Carol

Average of ratings: -