Allow modification of content in prePublish
hook
#7133
Labels
type: feature
code contributing to the implementation of a feature and/or user facing functionality
Is your feature request related to a problem? Please describe.
I want the CMS to automatically set the published date for entries when an entry is published for the first time. This should be doable with the
prePublish
hook a handler something like:But the
invokePrePublishEvent
function (unlikeinvokePreSaveEvent
) doesn't return the updated data.Describe the solution you'd like
I'd like the
prePublish
hook to allow updating entry data.Describe alternatives you've considered
I tried to think of a way to do this only using the
preSave
hook, but don't think it's possible.Additional context
It would be worth considering whether all hooks (or at least all
pre
-hooks should be able to update data.The text was updated successfully, but these errors were encountered: