Posts

Showing posts with the label drupal8

Custom MySQL Database to Drupal 8 Migration

Image
There are thousands of websites which are using MySQL as database. If we need to migrate data from Websites, which are using MySQL database, to Drupal 8 then we can use this blog post as starting point. We have a sample MySQL Database 'mysql_custom_db' which contains two tables, users and pages. The data in 'users' table looks like below,   The data in 'pages' table looks like below, As all the fields in 'users' table, from source database, will map to User entity in Drupal 8 site so we don't need make any changes there. But as we are migrating 'pages' table data to 'Basic Page' content type in Drupal 8 site, so we need to create required fields in 'Basic Page' content type. We have created the fields in 'Basic Page' content type and it looks like below, In our migration, field mapping between source site (pages) and destination site (Basic Page' content type) is like below, city...

How did we uninstall / disable troublesome module in Drupal 8?

Most of the times, module can be uninstalled from the Module Uninstall page (/admin/modules/uninstall) of Drupal 8. We can also use following drush command to uninstall a module, drush pm-uninstall module-name But as we know, contrib / custom modules are maturing day by day, sometimes we see D7 specific code in uninstall hooks which cause issues during uninstallation of module. We were having the similar issue. We were not able to uninstall the module from Drush or from Module Uninstall interface as it was throwing errors due to code in hook_uninstall(). The 'acquia_search_multi_subs' module was giving error in our case during uninstall and data in 'config' table looks like below, drush sqlq "select * from config where name='core.extension'" core . extension a : 2 :{ s : 6 : "module" ; a : 74 :{ s : 16 : "acquia_connector" ; i : 0 ; s : 13 : "acquia_search" ; i : 0 ; s : 24 : "acquia_search_multi_subs...