cms icon indicating copy to clipboard operation
cms copied to clipboard

Changing a field from Matrix to another fieldtype orphans the matrix table and elements

Open alexmglover opened this issue 6 years ago • 2 comments

Description

I switched a matrix field to a plaintext field (I was actually trying to switch the field because the matrix field wouldn't delete, but that's another story).

I ended up deleting the field as a plaintext field and the matrix table did not delete.

I tried re-creating the field as a matrix and deleting again and the table is still there.

Steps to reproduce

  1. Create a Matrix field.
  2. Switch the Matrix field to a Plaintext field.
  3. Check the database, the matrix table and elements still exist in the database.

Additional info

  • Craft version: 3.2.8
  • PHP version: 7.2
  • Database driver & version: Maria DB

alexmglover avatar Aug 10 '19 02:08 alexmglover

Yeah this is a known issue which we plan on fixing in Craft 4 alongside some other field refactoring.

brandonkelly avatar Aug 11 '19 15:08 brandonkelly

Thank you!!

alexmglover avatar Aug 11 '19 15:08 alexmglover