Sunday, February 06, 2022

breaking a moodle installation by adding an html block

Our moodle development instance seemed to be broken - none of the javascript, like the drop-down to log in or the gear icons to edit blocks, seemed to work. The issue seemed to be an HTML block added for testing. Clearing the cache alone did not help, since the broken HTML was still present, and was blocking all javascript execution. And the broken HTML could not be cleared from the UI, since the gear icon's javascript was not working, so the edit page was not coming up. 

From the Moodle in English forums, found the location of html blocks to be "serialized, then base64encoded and stored inside the configdata field of the mdl_block_instance table." In our case, the mdl_ was replaced by our prefix, of course. So I dug out DBeaver, and blanked out the last three rows from the prefix_block_instance table. Problem solved for now. 

No comments:

Post a Comment