You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I ran into this using Image Optimize which stores its array of images in a custom field.
One asset volume has the custom field, the other doesn't. I moved my assets from the volume with the custom field to the other without it, and the data persists in the database causing conditionals to return true and the Image Optimize plugin to not be able to process the unknown field:
Impossible to invoke a method ("src") on a string variable ("{"optimizedImageUrls":{"292":"/images/content/_292x293_crop_center-center_line/AA1.png"},"optimizedWebPImageUrls":{"292":"/images/content/_292x293_crop_center-center_line/AA1.png.webp"},"variantSourceWidths":["292"],"variantHeights":{"292":293},"focalPoint":{"x":0.5,"y":0.5},"originalImageWidth":"292","originalImageHeight":"293","placeholder":"","placeholderSvg":"","colorPalette":[],"placeholderWidth":292,"placeholderHeight":293}").
I contacted Andrew about this and he suggested this was possibly part of a bigger issue of Craft not clearing custom field data on asset changes.
I can see where keeping this data might be useful when transferring assets around volumes, and back again, but there's no way to clear the data otherwise.
The text was updated successfully, but these errors were encountered:
stevehurst
changed the title
Assets moved to new volume don't clear custom field data
Moving Asset from one Volume to another doesn't clear Custom Field data
Nov 2, 2018
Description
I ran into this using Image Optimize which stores its array of images in a custom field.
One asset volume has the custom field, the other doesn't. I moved my assets from the volume with the custom field to the other without it, and the data persists in the database causing conditionals to return true and the Image Optimize plugin to not be able to process the unknown field:
Impossible to invoke a method ("src") on a string variable ("{"optimizedImageUrls":{"292":"/images/content/_292x293_crop_center-center_line/AA1.png"},"optimizedWebPImageUrls":{"292":"/images/content/_292x293_crop_center-center_line/AA1.png.webp"},"variantSourceWidths":["292"],"variantHeights":{"292":293},"focalPoint":{"x":0.5,"y":0.5},"originalImageWidth":"292","originalImageHeight":"293","placeholder":"","placeholderSvg":"","colorPalette":[],"placeholderWidth":292,"placeholderHeight":293}").
I contacted Andrew about this and he suggested this was possibly part of a bigger issue of Craft not clearing custom field data on asset changes.
I can see where keeping this data might be useful when transferring assets around volumes, and back again, but there's no way to clear the data otherwise.
The text was updated successfully, but these errors were encountered: