Offending mod can leave an Elgg site unusable
|Reported by:||tetrode||Owned by:|
When installing a mod with problems, it can leave the site completely useless, resulting in only a blank screen. I encountered this during the creation of my first mod. By going into the database:
SELECT m.id, n.string as name, v.string as value from elggmetadata m
JOIN elggentities e ON e.guid = m.entity_guid
JOIN elggmetastrings v on m.value_id = v.id
JOIN elggmetastrings n on m.name_id = n.id
WHERE n.string = 'enabled_plugins'
ORDER BY m.id;
DELETE FROM elggmetadata m
WHERE m.id = <offending_mod_id>;
I was able to repair it. It would be a good idea to have a possibility for the admin to go to a specific URL, log in with an admin account and view a list of the current enabled and disabled mods and have the ability to disable the offending mod.
Alternatively, Elgg could perhaps detect that a mod was not functioning correctly and not enable it...
As I am not well versed (yet) in Elgg/PHP I am not able to give a patch - perhaps in the future.