Removal of custom fields

When a custom field is removed, what happens to the data that was there? In this case, I’m talking about a custom field in the group editor that is specified in /livewhale/client/custom_fields.config. If the field specification is removed from the file what happens with respect to the database? is the field destroyed or is it still there with its data just no longer able to be edited and used?

I guess it would also be instructive to know what happens to custom fields that are removed from profile type definitions and other dynamic content types too.

Thanks,

-= G =-

From my experience, I believe this is mostly the case. I suspect the data might still be able to be used, though, since it is still in the database. It just can’t be edited. If you were to add the field back later, it should be editable again.

I am curious if my assessment is correct, though.

I am going to try it on dev and will let you know…

I believe Jon is right, custom fields in LW (saved in livewhale_custom_data in the database) have their data preserved—until the parent story/profile/group/event/etc is deleted—even if the config option that displays it in the editor is removed. I don’t know if it’s accessible in 100% of front-end spots after that removal, but I bet it is with $_LW->getCustomFields in a custom module.

That’s different from Profile and Blog types which have their own mechanism for adding/editing fields. In that case, the next time each individual profile is re-saved, any data not matching one of the existing/configured Profile Type Fields will get dropped. Hope this helps!