Content files cleanup

I changed field names in my yaml file. The pagename.language.txt files in my content folder is adding the new fields in the end but not removing the old fields from the files. Is this as it should be?

Yes, old fields are not removed automatically. But you can either clean them up programmatically, or you rename the old fields with search/replace in your IDE.

Thank you!

with the site running locally, you if you open the offending page in the panel, then open the content file for that page in a code editor and remove all the content and save so that the file is empty, and then press save in then panel, it should write back the data to the file with the old fields and data ommitted.

There’s also a recipe about cleaning up programmatically:

1 Like

Nice. Exactly what i was looking for. Has been working perfectly.