backdrop-contrib / d2b_migrate

GNU General Public License v2.0
5 stars 6 forks source link

How to uninstall d2b after migration? #26

Closed indigoxela closed 7 months ago

indigoxela commented 8 months ago

Sounds simple, but isn't.

The d2b module wasn't installed on D7, after migration it's not enabled, but trying to enable throws a fatal...

It can't get installed again, it can't get uninstalled, as it's status is "0" in system table.

How to get rid of it after migration without directly fiddling in the database? :wink:

docwilmot commented 8 months ago

If its status 0 in System table then you should just delete the project folder and flush caches. But I'm curious why it would throw an error to re-enable, since by the time the conversion is done the site is a Backdrop site again. Could you say what error the logs report?

indigoxela commented 8 months ago

Sorry, didn't provide the message, have to run the test again.

My assumption: it's not cleanly uninstalled as the config's still around (d2b_migrate.settings). That config's also not covered by a hook_config_info it seems.

indigoxela commented 8 months ago

Ah, sorry, my initial report is a bit misleading - it's actually backup_migrate causing the fatal after migration:

DatabaseSchemaObjectExistsException: Table backup_migrate_profiles already exists. in DatabaseSchema->createTable() (line 661 of .../core/includes/database/schema.inc).

That's because B&M wasn't installed on the Drupal site, got installed on the fresh B site (as it's a dependency of d2b). But then things fail hard, when trying to enable B&M.

But config also shows the usual problems:

admin/config/development/configuration/single/export

    Warning: Trying to access array offset on value of type null in field_config_label_instance() (line 436 of .../core/modules/field/field.module).
    Warning: Trying to access array offset on value of type null in field_config_label_bundle() (line 447 of .../core/modules/field/field.module).

d2b_migrate.settings.json exists but isn't owned by any module. (No hook_config_info)

docwilmot commented 8 months ago

Switched to using state_set() instead of config, so that should fix this.

irinaz commented 8 months ago

@indigoxela , I have similar question to most of modules in Backdrop - I do not see any options to uninstall modules in /admin/modules/uninstall

if this is problem with all modules we should file this issue at the core level.

indigoxela commented 8 months ago

I have similar question to most of modules in Backdrop - I do not see any options to uninstall modules in /admin/modules/uninstall

Unlike D9+ in Backdrop you first have to disable a module, before you can uninstall it. That's similar to how it was in D7.

irinaz commented 8 months ago

@indigoxela , thank you, this is very helpful!!

irinaz commented 7 months ago

@docwilmot , @indigoxela , I can disable d2b module in the same way as all other modules. Can we close this issue?