Closed sijones-uk closed 3 years ago
Sorry for the previous comment, that was intended for a different issue 🤦
As far as this recommendation goes - it's only needed for element types that support drafts. Since assets don't support drafts (and unlikely will in any foreseeable future), using isNew
is fine here.
Description
Since Craft 3.7.5, the
isNew
property is no longer reliable when determining whether the entry is being saved for the first time. It is recommended to use the newly created (as of Craft 3.7.5)firstSave
property instead.Steps to reproduce
Plugin
class uses theisNew
property to check if the Asset model is newly createdAdditional info