Can I manually uninstall H5P from Drupal? (Can't access any admin function because of H5P!)

I was one of the first users of H5P in Drupal, about 4 years ago. And H5P worked fine all these years. 

But after a recent upgrade of my Drupall install (to 7.59), I could not log into my admin system of Drupal anymore!

So, I cannot uninstall H5P through the admin system...

Actually, I can't do anything anymore with this Drupal site because of an incompatibility with the H5P plugin... 

Serious problem!

 

 

Everytime I want to login as admin user, I get the following error message:

---

Error The website encountered an unexpected error.

Please try again later. Error message PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'restricted' in 'field list': SELECT library_id as id, machine_name as name, title, major_version, minor_version, patch_version, runnable, restricted FROM {h5p_libraries} ORDER BY title ASC, major_version ASC, minor_version ASC; Array ( ) in H5PDrupal->loadLibraries() (line 95 of /home/itronix/public_html/d/sites/all/modules/h5p/h5p.classes.inc).

---

Can anyone give me a tip how to solve this issue?

For example: Can I manually uninstall H5P from Drupal?

Thanks on beforehand!

Filip Delannoy

 

otacke's picture

Hi Filip!

Sorry that you're having trouble. I have updated to 7.59 myself, but I didn't encounter any problems.

It's a little strange that the column is not found in the database. Have you tried to add it to the libraries tabletinyint in case it's really missing? (tinyint, not NULL, default: 0)

And yes, you can remove H5P manually from Drupal, or at least I have done it before. As always when tampering with things like that: make a backup of your data (Drupal folder on your harddrive and Drupal database). In particular, all your existing H5P content should be inside <your-drupal-site>/sites/default/files/h5p/exports as .h5p files. You have been warned.

I didn't bother about existing content and could be "brutal":

  1. delete <your-drupal-site>/sites/all/modules/h5p
  2. delete <your-drupal-site>/sites/default/files/h5p
  3. delete all the H5P tables in your database
  4. delete all remaining database entries that contain H5P (I used a global search on Drupal's database and removed those items)

After these steps, I could reinstall H5P again.

If you don't want to lose your existing content, the process will be more intricate, and probably require some tweaking in your database that I am not sure about. If H5P works on your system after reinstalling it, you could try to revert steps 2-4 by using your backup, but I cannot guarantee that this will work. Depending on the amount of content, it may be easier to re-upload the single H5P files from your backup.

Best,
Oliver