Drupal - Why can't I delete certain content types?

Delete them by going to the url /admin/structure/types/manage/content-machine-name/delete

content-machine-name being the machine name of the content type you want to delete. Also, make sure you use dashes in the machine name rather then underscores.


You can only delete content types that are created manually (via admin/structure/types/add).

Content types that don't have a delete link are created programmatically by installed modules and will be deleted after you uninstall them.


As hpn mentioned You can only delete content types that are created manually.

But sometimes things do not go smoothly. The following steps have helped to delete content types. You need to backup the database before trying this.

[To manually delete a content type that was created 1 #16 Nedjo suggests in drupal.org:

  • Disable the feature. I've sometimes run into problems with this--a feature won't disable. In this case, remove the feature module code.
  • Determine the machine name of the content type to be deleted, e.g., 'mytype'.
  • In the database, revert the node_type table values to the defaults as if the content type were created manually through the UI:

mysql> UPDATE node_type SET module = 'node', custom = 1, modified = 1, locked = 0 WHERE type = 'mytype';

  • Clear caches to ensure the content type change is available.
  • Through the UI at admin/structure/types, delete the content type.

The above steps is what it has helped me before when I have found those problems.

Tags:

Nodes

7