If Categories or Tags have been entrified, the fields could have been changed to Entries field, but the feed still refers to them by their original type. Because of that, check if the field we got by handle matches the type saved in the feed, and if it doesn’t, use the Entries field type.
Once the feed is saved after entrification, the field type gets updated, so the code that changes the field type won’t be executed anymore.
Description
If Categories or Tags have been entrified, the fields could have been changed to Entries field, but the feed still refers to them by their original type. Because of that, check if the field we got by handle matches the type saved in the feed, and if it doesn’t, use the Entries field type.
Once the feed is saved after entrification, the field type gets updated, so the code that changes the field type won’t be executed anymore.
(Just for Craft 4.)
Related issues
1340