We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17959 ☆ A M B ☆
    • 57 Posts
    Magnatron [Maarten Wolzak] Reply #1, 13 years, 8 months ago
    Hi all,
    I'm used to doing a switch($modx->event->name){ to effectuate the right part of a plugin and logging possible errors or helpful info to the log with $modx->log(LEVEL, "...").
    Since the last update (to 2.2.4-pl traditional) the system reports the wrong event->name.
    Only 'OnParseDocument' gets reported but it gets reported for each event.
    I have the event 'OnDocFormSave' ticked on the 'System Events' tab but it gets the event->name 'OnParseDocument'.
    Has anyone seen this behavior before? Any ideas on what I'm missing?

    Thanks,

    Maarten
      • 17959 ☆ A M B ☆
      • 57 Posts
      Magnatron [Maarten Wolzak] Reply #2, 13 years, 8 months ago
      Hi all,

      I changed the plugin from being a Static Resource to an internal one and now the event name is reported correctly.

      I've added a description of this behavior to bugreport #9340 (http://tracker.modx.com/issues/9340)
        • 3749
        • 24,544 Posts
        I've had some trouble with plugins set as static elements. Thanks for reporting that.
          Did I help you? Buy me a beer
          Get my Book: MODX:The Official Guide
          MODX info for everyone: http://bobsguides.com/modx.html
          My MODX Extras
          Bob's Guides is now hosted at A2 MODX Hosting