Hi,
I'm following the development of Deploy/Multiversion/etc with great interest! When I tried to upgrade multiversion from alpha1 to alpha2, it didn't work, so I am trying to uninstall multiversion, but I can't! Here's why:
The following reasons prevent Multiversion from being uninstalled:
There is data for the field revision_id on entity type Custom block
There is data for the field workspace on entity type Custom block
There is data for the field _deleted on entity type Custom block
There is data for the field _rev on entity type Custom block
There is data for the field vid on entity type Content
There is data for the field workspace on entity type Content
There is data for the field _deleted on entity type Content
There is data for the field _rev on entity type Content
There is data for the field revision_id on entity type User
There is data for the field workspace on entity type User
There is data for the field _deleted on entity type User
There is data for the field _rev on entity type User
Is there anything I can do about this? It's no biggie because it's all test data anyway, but perhaps the report helps any way.
Comments
Comment #2
dixon_Thanks for reporting and testing out the modules. During alpha releases we will only test and support fresh installations. So there won't be any upgrade support between releases until we start releasing beta.
That said, regarding the specific issue you're having; the challenge with Drupal 8 is that you can't install a module that provides entity storage (such as Multiversion) if there are content in the storage. So in order to uninstall Multiversion you need to empty ALL entity stores. This obviously includes storage for the user entity, which makes the scenario very tricky since we can't remove the user (including current user etc).
During installation we do a migration between the old and new storage handler. In order to support uninstallation of Multiversion we would need to implement a backward-migration solution... It's tricky but not impossible.
If anyone wants to tackle this, I'm happy to accept patches! I'll leave this open so that we don't lose track of it. At some point we definitely need to fix this...
Comment #3
ashopin commentedI'm having the same issue trying to uninstall this module and now I can't add content to field_collection fields, I get an default revision ID error. There should be a massive warning on the project page if this is a known issue: can't uninstall module.
Comment #4
Lowell commentedyes, this seems like a very dark path
I can't delete custom blocks, and because of that block, I can't uninstall multiversion.
Comment #5
Lowell commentedhmm, on a clean install, uninstall is also not possible but with a much smaller error message
The following reasons prevent the modules from being uninstalled:
There is data for the field revision_id on entity type User,
There is data for the field workspace on entity type User,
There is data for the field _deleted on entity type User,
There is data for the field _rev on entity type User,
There is content for the entity type: Workspace
Comment #6
jeqq commentedComment #7
eigentor commentedI have run into the same problem. Luckily I only installed it on a local copy of my site.
I guess this needs a mechanism that may other D8 modules could also benefit from: a real UI uninstaller. Some kind of "I am aware of the danger blah blah" checkbox in flashing red that lets you remove the data.
With the new forced uninstall when disabling a module this needs a standard uninstall procedure. In D7 I guess this was possible: Uninstalling meant removing all data in variables table and everywhere else. Now there is a security mechanism that keeps you from destroying your own work, which is basically a good thing.
But this module serves as an example what can happen.
Comment #8
artreaktor commented+1 for #7
Comment #9
jeqq commentedMultiversion now provides a custom page (
/admin/config/multiversion-uninstall) where admin users can uninstall the module (http://cgit.drupalcode.org/multiversion/commit/?id=8bdd42c).Thank you!
Comment #10
artreaktor commentedI'm wondering is there any "hacky" way to get rid of 8.x-1.0-alpha1?
e.g. delete some fields/tables in DB
Comment #11
timmillwood@artreaktor - I think it would be easier to just re-install the site.
Comment #12
artreaktor commented@timmillwood not in my case...
Comment #13
darkstartom commentedI'm having exactly the same problem. I've updated to 8.x-1.0-alpha6 but when I try to go to the link mentioned in #9 I get a page not found. How can I uninstall this?
Comment #14
Lowell commentedI don't think there is a safe upgrade path from the older alpha versions
You'll most likely have to reinstall your site in order to upgrade this module
Comment #16
darkstartom commentedSome more details for you:
Using 8.x-1.0-alpha7
When I try to uninstall via the link mentioned in #9 the words "Uninstalling Multiversion" appear briefly with the spinning icon. However the module is not uninstalled and I get an error written to my php error log:
Error: Class 'Drupal\migrate\Entity\Migration' not found in /Volumes/HDD/Tom/Documents/Projects/drupal/modules/contrib/multiversion/src/MultiversionMigration.php on line 90
Comment #17
jeqq commented@DarkstarTom This has been fixed in the dev version.
Comment #18
darkstartom commentedWhen I try to install 8.x-1.x-dev it says "Multiversion is already installed."
How can I get the dev version to install? Thanks!
Comment #19
timmillwood@DarkstarTom - Just replace your copy of Multiversion with the dev version.
Comment #20
dpolant commentedThe problem with this uninstaller is that it doesn't do any batching and thus runs out of memory if you have a lot of content.
Out of curiosity, what would happen if I just deleted the module and removed it from the system table (or whatever drupal 8 has). Of course this is nasty but I'm short on options at the moment.
Comment #21
dpolant commentedAlso, why does multiversion complain about there being data in the node vid column? I feel like if we could get it to ignore that at least we could prepare it for uninstall using raw sql queries.
Comment #22
damienmckennaFYI I opened #2808093: Use batch for uninstalling the module? as a temporary solution until #2692033: Move all migration code into entity_storage_migrate module is done.
Comment #23
hypertext200I had the same issue and here is how I uninstalled it, the batch process or drush command didn't work. I had Workspace, Replicator modules installed too so I had to uninstall them first.
1. Remove everything from multiversion.settings.yml so the
enabled_entity_types:will be as follow.enabled_entity_types: []2. Run drush cim to import the config.
3. Clear the cache.
drush cr4. Now if there are any Workspace entities deleted they by running
drush munor use the module uninstall interface and run the batch by clicking on the link.5. Clear the cache.
drush cr6. Uninstall the module
drush pm-uninstall multiversion.7. Export configurations.
drush cexNow optionally you can search each entity DB table and remove
_deleted,workspaceand_revfields from those tables. For Files and some other entities like Menu item content there are some_revisiontables andrevision_idadded to the data table too, so remove those.Update :
For the menu items it appeared to that custom menu item ids will be different and once the module is gone those will stop working, so in order menus to work remove everything for those custom menu items from menu_tree table.
Comment #24
josebc commentedIm trying to run entity-updates after but getting this error for block entities
Drupal\Core\Database\IntegrityConstraintViolationException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1-131-1-0-ar' for key 'PRIMARY': INSERT INTO
{field_deleted_revision_e0e146fad0} (bundle, entity_id, revision_id, langcode, workspace_target_id, deleted, delta) SELECT base_table.type AS bundle, entity_table.id AS entity_id,
entity_table.revision_id AS revision_id, entity_table.langcode AS langcode, entity_table.workspace AS workspace_target_id, :deleted AS deleted, :delta AS delta
FROM
{block_content_field_data} entity_table
INNER JOIN {block_content_field_data} base_table ON entity_table.id = base_table.id
WHERE entity_table.workspace IS NOT NULL FOR UPDATE; Array
(
[:deleted] => 1
[:delta] => 0
)
Comment #25
josebc commented