Event as a reference to event was removed in Revo on purpose. event->name should be available in Evo, but I’m not sure.
I see both are used in Evo ($modx->Event in siteCache.idx.php) but I could only find $modx->event in Revo.
Wondering what’s up with this.
Also, is the event name available in Evo as $modx->event->name?
Quote from: BobRay at Sep 12, 2009, 06:13 AMEvent as a reference to event was removed in Revo on purpose. event->name should be available in Evo, but I’m not sure.
I see both are used in Evo ($modx->Event in siteCache.idx.php) but I could only find $modx->event in Revo.
Wondering what’s up with this.
Also, is the event name available in Evo as $modx->event->name?
I use $modx->log() and this IMO should become the standard way of debugging. An error console, similar to what is seen in Package Management should be developed (which uses $modx->log()), but how to implement this for front-end use needs TBD.
Thanks, I’ll test it and let you know. That reminds me of a question I’ve been meaning to ask about debugging plugins. What’s the best way to pop up a debugging message in a plugin in Revo? I’ve tried alert() but it usually doesn’t work.
I use $modx->log() and this IMO should become the standard way of debugging. An error console, similar to what is seen in Package Management should be developed (which uses $modx->log()), but how to implement this for front-end use needs TBD.
This is done by changing the "log target" via $modx->setLogTarget($target), where $target can be "HTML", "ECHO", a file target definition, or a modRegister instance. By default, MODx uses a file target definition which points at the core/cache/logs/error.log, and when installing a package, it is temporarily directed to a modRegister instance. The setLogTarget() function returns the current target so you can set it back once you are done redirecting to another target temporarily.
Quote from: OpenGeek at Sep 12, 2009, 07:33 PM
I use $modx->log() and this IMO should become the standard way of debugging. An error console, similar to what is seen in Package Management should be developed (which uses $modx->log()), but how to implement this for front-end use needs TBD.
Can you remind me how to get $modx->log() to display a message on the screen rather then writing to the error log?