We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 9102 ☆ A M B ☆
    • 318 Posts
    I'm trying to evaluate chunks in a processor running within a console, and I want to evaluate them in a front-end context. I tried using switchContext, but as soon as I switch to the web context, the console no longer receives info messages from the processor, and it never registers a success event. The processor continues to execute and finishes its job, but the user will never know that because the success event never fires.

    How can I evaluate chunks in a processor in a front end context and still communicate messages to the console?
      • 9102 ☆ A M B ☆
      • 318 Posts
      I figured out one way to do this that seems to work: initialize another instance of the modX class, switch its context, and then use its getChunk method to process the chunk.

      I'd be interested to hear if there's a better way, or if there are potential problems with this method, but it seems to have solved my problem.