<![CDATA[ Firing action when new Resource is published - My Forums]]> https://forums.modx.com/thread/?thread=104404 <![CDATA[Firing action when new Resource is published]]> https://forums.modx.com/thread/104404/firing-action-when-new-resource-is-published#dis-post-561550 I am trying to do a POST call to my webhook when a new Resource is published.

I made my own plugin that does all the logic, I fire the plugin OnDocFormSave and OnDocPublished. Everythink works fine, but the plugin is not fired when a Publish date is set.

I read this topic:
https://forums.modx.com/thread/?thread=44201&i=1

But still I cannot make it work. The topic is also over 7 years old. Is there a new way to fire an event every time a new Resource is published (through administration or with the Publish date set)?]]>
constantinejohny Sep 15, 2018, 02:03 PM https://forums.modx.com/thread/104404/firing-action-when-new-resource-is-published#dis-post-561550
<![CDATA[Re: Firing action when new Resource is published]]> https://forums.modx.com/thread/104404/firing-action-when-new-resource-is-published#dis-post-561586
Could you file that as a feature request here: https://github.com/modxcms/revolution/issues]]>
BobRay Sep 18, 2018, 04:19 AM https://forums.modx.com/thread/104404/firing-action-when-new-resource-is-published#dis-post-561586
<![CDATA[Re: Firing action when new Resource is published]]> https://forums.modx.com/thread/104404/firing-action-when-new-resource-is-published#dis-post-561563 "Fires after a Resource is saved in the manager via the editing form."

And the same for OnDocPublished.
"Called when a Resource is published via the Publish context menu."

But when you set the time to Publish a document in the future (eg tomorrow), these events are not fired up.

I tested with sending a simple message every time you save a document, then every time you publish one. The Publish is not sending anything when I set the Publish date.


There is nothing to show really. I am just sending a curl JSON request to my Discord webhook.]]>
constantinejohny Sep 16, 2018, 05:21 PM https://forums.modx.com/thread/104404/firing-action-when-new-resource-is-published#dis-post-561563
<![CDATA[Re: Firing action when new Resource is published]]> https://forums.modx.com/thread/104404/firing-action-when-new-resource-is-published#dis-post-561561
Also some code would help]]>
nuan88 Sep 16, 2018, 01:03 PM https://forums.modx.com/thread/104404/firing-action-when-new-resource-is-published#dis-post-561561