How to detect that a scheduled entry has been published? #10858
-
|
I need to notify users when a new entry is published, if the entry is published (status = Live) from the begining I can detect it easily, by checking the When the entry is automatically published, I can't detect it. I've tried to use Any ideas? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
|
This module can be used to track the moment an entry goes live. |
Beta Was this translation helpful? Give feedback.
-
|
Any idea how this can be accomplished with 5.x? Cannot seem to find any event and the module is outdated. |
Beta Was this translation helpful? Give feedback.
-
|
Just PR’d a native solution for this for Craft 5.7: there’s a new |
Beta Was this translation helpful? Give feedback.

Just PR’d a native solution for this for Craft 5.7: there’s a new
staticStatusesconfig setting, which can be used to opt into having entry statuses stored statically and only updated on entry save; plus anupdate-statusesCLI command that can be hit with a Cron job, which updates any entries with out-of-date statuses, triggeringsaveevents and clearing caches in the process. (Plus a newEntry::$oldStatusproperty that can be checked fromsaveevent handlers to see if the status just changed.)