I recently deleted some fields (media_term_fruits
) and created new fields (media_fruits
) on a local dev site. I then exported the config and pushed it to my dev server.
My dev server uses Github Actions to import config and everything imported with no errors.
However, for my media image fields, I set the image path using a token via the Filefield Paths module. This token referenced a deleted field (media_term_fruits
), but the config imported as valid config even though the field media_term_fruits
no longer exists.
If I go to the /admin/structure/media/manage/image/fields/media.image.field_media_image
page and re-save the config, I get the error:
File path is using the following invalid tokens:
[media:field_media_term_fruits:0:entity:url:path].
Is there some way to catch this error automatically (perhaps during config import) instead of requiring me to visit the site and manually resave all the config to check for errors?
Here, I gave the example of the Filefield Paths module, but please consider this question to apply to any module in which the exported config values can be imported, but those values are actually invalid for the site and will produce an error when attempting to save the data on the config page.