Warning: Declaration of TCB_Menu_Walker::walk($elements, $max_depth) should be compatible with Walker::walk($elements, $max_depth, ...$args) in /home/nicklit/www/www/wp-content/plugins/thrive-visual-editor/inc/classes/class-tcb-menu-walker.php on line 620

Warning: session_start(): Cannot start session when headers already sent in /home/nicklit/www/www/wp-content/plugins/userpro/includes/class-userpro.php on line 222
Simple way to re-install drupal modules - Nick Litten is IBM-i, AS400 iSeries RPG Programmer and Nerd

Simple way to re-install drupal modules

IBM i

Mar 06

This website has been running on the Drupal CMS since upgrading from Joomla to Drupal 5 back in 2007. I’ve closely followed each new Drupal release and experienced the teething pains as modules have evolved to the exciting state they are in the moment.

Drupal Rocks and I’m eagerly awaiting the new Drupal 7 release (as soon as some of my core modules are compatible – your hear that ubercart? 😉 )

During this time I’ve managed to throughly cock-up a number of drupal modules, and while playing the php-cleanup-game on nicklitten.com this morning I discovered something rather nifty.

To re-install corrupted Drupal Modules using the Devel Module.

Drupal stores some information about themes/modules/theme engines in a table named system. It’s easy to edit manually and shows every single modules that you have installed on the site back to the year dot. Basically, all you have to do in order to make Drupal forget your module is this:

DELETE FROM system WHERE name = 'module_name' AND type = 'module'

Of course, to delete all the related modules and bits + pieces using the like opcode:

delete from system where filename like '%ecommerce%' and type ='module'

So thats the manual method. It’s really nice to cleanup the file. You can do it manually for modules that you want to re-install or just use the DEVEL module.

Follow

About the Author

IBM i Software Developer, Digital Dad, AS400 Anarchist, RPG Modernizer, Alpha Nerd and Passionate Eater of Cheese and Biscuits. Nick Litten Dot Com is a mixture of blog posts that can be sometimes serious, frequently playful and probably down-right pointless all in the space of a day. Enjoy your stay, feel free to comment and in the words of the most interesting man in the world: Stay thirsty my friend.