We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 15076
    • 43 Posts
    Hi all,

    I am creating a plugin that sends an email whenever a document is saved and a tv is set to yes. First I created a snippet that did this because it is earlier debugging. Next I copied the snippet code into a plugin and tagged the ondocformsave event. However, the plugin is not executed. So I tried sending a simple email with the plugin by using php mailer, but it doesn’t work. When I put the code in a snippet, it does work.

    The only difference between the snippet and the plugin is that the snippet contains a line
    $id = $modx->documentIdentifier


    I have another plugin thats working on the ondocformsave event that is working fine. In the event order the mail plugin I am creating should happen before the other plugin.

    Does anyone have an idea why the plugin is not doing anything?

    Thanks in advance,
      • 6228
      • 249 Posts
      I have a feeling that $modx->documentIdentifier is returning a null value in the plugin. I encountered a similar problem once.

      Have you solved this yet?
        lo9on.com

        MODx Evolution/Revolution | Remote Desktop Training | Development