Whether you've decided after trying it not to use Scald or you have gotten things so messed up it woud be easier to start over, you'll find that uninstalling Scald takes a bit more thought than uninstalling a simple little module. Scald is a huge package with many dependencies, custom entities and fields and taxonomies. Uninstalling in the right order will result in a cleaner slate to start with. Also, as of this writing, not all modules in the Scald suite have proper uninstall hooks (see #2105571: Cannot uninstall Scald: Twitter) and this tutorial assumes that my patch in that issue is applied.

The most important rule is not to simply run a "drush dis scald" before uninstalling individual modules, because many modules uninstall functions depend on Scald core functions.

Before you start

Back up your database! Scald is a large and complex package. Things could go wrong.

1. Delete all Atoms from admin/content/atoms
If you have a lot of them, you may need to create a new view with Views Bulk Operations (VBO) to allow you to do this in batch.

2. Remove Scald fields.

If you don't do this, you will be unable to uninstall the Atom References module

  • Get your field list at: admin/reports/fields
  • Look for fields of type Atom Reference and click on the link to each related content type and delete those fields.
  • Look for the following fields and delete them also from your entity types: scald_authors, scald_file, scald_tags, scald_thumbnail (you cannot delete the scald_authors_url field).
  • Reload your field list and make sure all Scald fields are gone (or at least all Scald Atom Reference fields).

3. Uninstall the modules.

Never uninstall a module on which other modules depend (says "Required By" in the description on the modules admin page) unless those modules are already uninstalled.

  • You can do this iteratively from the modules admin page - disable, then uninstall then disable then uninstall.
  • Or you can try a bash script that executes many drush commands in order (see below)

At least in my installs, Scald Quickstart did not show up in the uninstall list, whereas when doing this with drush, drush correctly catches the dependency and forces you to uninstall Scald Quickstart before proceeding.

In terms of order via drush, this seems about right though of course the actual commands will depend on which modules you have enabled. Remember to run this as a bash script, you will need to make it executable (chmod u+x scald-uninstall.sh ):

#!/bin/bash

drush -y dis scald_galleria
drush -y pm-uninstall scald_galleria

# Note: it hurts nothing to have extra Players and Providers listed in this section
# but if you have active providers not mentioned, you should add them, but watch dependencies
# (for example Gallery depends on Image, so don't disable image before uninstalling Gallery).

drush -y dis scald_gallery scald_file scald_youtube scald_vimeo scald_twitter scald_instagram 
drush -y pm-uninstall scald_gallery scald_file scald_youtube scald_vimeo scald_twitter scald_instagram 

drush -y dis mee scald_quickstart
drush -y pm-uninstall mee scald_quickstart

drush -y dis scald_image scald_dnd_library
drush -y pm-uninstall scald_image scald_dnd_library

# Now check your Scald Providers and Scald Players. Note that many Scald Providers are 
# under the main Scald section, not under the Providers section, but you can 
# identify Providers because the Description usually begins with "Provides".

drush -y dis atom_reference dnd
drush -y pm-uninstall atom_reference dnd

drush -y dis dnd
drush -y pm-uninstall dnd

drush -y dis scald
drush -y pm-uninstall scald

4. Remove Scald Vocabularies

From admin/structure/taxonomy delete the following vocabularies

  • Authors
  • Scald Tags

5. Flush all caches

  • from admin/config/development/performance
  • drush cc all

6. Delete Modules Files

If you're not using git, best to move files to a safe holding place in case you need to back out of this process.

7. Final cleanup.

Scald will still leave a bit of detritus around your system. None of this does any harm and it is safest to just leave it. Some of this can't possibly be cleaned up by a uninstall hooks because it is based on interaction with a large set of modules.

After uninstall, I did a full search on my database. You'll find things that you may want to clean up through the UI if at all possible. This is not a checklist, but just the types of things I found:

  • Any content where you had an atom will obviously have a [scald...] tag.
  • CKEditor profiles have the Atom Button
  • default/files will have Scald directories like "thumbnail"
  • For a multi-lingual site, the i18n_strings, locales_sources and locales_target tables will have Scald terms.

And a couple of uninstall items that Scald should catch, but doesn't

  • table field_config and table field_config_instance both list the scald_author_url field. You could delete this or leave it. Leaving it is safest. I deleted it with no ill effects (a fair bit of testing since and no errors). However, you are operating directly on the database at this point, so you are taking some risk. In any case, if you are daring, these commands will do it for you:
    • DELETE FROM `field_config` WHERE `field_name` LIKE 'scald_author_url';
    • DELETE FROM `field_config_instance` WHERE `field_name` LIKE 'scald_author_url';

8. Test

You've just done major surgery on your site. Test content types (can you add and edit). Test whatever media management you still have in place. Test CKEditor. Etc. Etc. Etc. If something isn't working right, restore your files and your database and start over.

At this point, Scald is pretty much fully uninstalled and you're back to your starting point.

Comments

herrajon’s picture

I have checked permissions thoroughly.

I can not even view the atoms let alone deleting them. Gone into structure/scald/atom types and checked all boxes there; Fetch, Edit, View and Delete.

Any ideas?

P.s. By the way. Very good post you have there.

Edit: Got rid of the Atoms with VBO. I had not the options through/on the Scald Atoms page.

ergophobe’s picture

Sorry, I really haven't used Scald since writing this uninstall How To.