I recently discovered that removing a field from a content type removes its content table too. It seems straight forward, but it shouldn't work like this when that field/table is in use by multiple content types.

I had two content types that shared an image field. I decided it was no longer needed on one of them, so I removed it. This deleted the content_field_image table. It appears the entries in the files table were left intact, as was the field in the content type where I wanted the field to stay. The files were still in the directory, and the thumbnails still appeared on the content type, but the table was gone. Luckily I had done a database backup earlier in the day and I was able to recreate the table, otherwise this could have been quite a problem.

It seems that when removing a field, the process should check it is the only content type using it before deleting the table.

Comments

markus_petrux’s picture

Have you checked if the field is now on the content type table?

markus_petrux’s picture

Version: 6.x-3.x-dev » 6.x-2.x-dev
Status: Active » Postponed (maintainer needs more info)
karens’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

Closing for no response.

bredi’s picture

same problem. how do you remove it from one content type without deleting it from another? i.e. "Remove" not "Delete Field".

thanks