We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 46039
    • 76 Posts
    I am running a regex replace on _output within a plugin and it causes the site to return a blank page.

    I don't really understand how it's possible. Does MODX really care what _output contains? Is this an issue with my PHP? It's really confusing.

    As you can see below it seems to affect the cache.

    Error from server log:

    PHP Fatal error:  Call to undefined function testing() in /home/sites/domain.org.uk/public_html/core/cache/includes/elements/modplugin/7.include.cache.php on line 16


    core/cache/includes/ is empty.

    This question has been answered by BobRay. See the first response.

    [ed. note: johnnyp last edited this post 12 years, 6 months ago.]
    • discuss.answer
      • 3749
      • 24,544 Posts
      MODX doesn't care about the content (as long as there's no PHP code in it), but MODX isn't involved in your problem. The message is telling you that your code is calling a function called testing() that doesn't exist at that point in the code.

      If you have such a function in your code, move it to the top -- above the call to the function.
        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
        • 46039
        • 76 Posts
        I just read your reply and thought to myself "No way am I that stupid". Then I looked at my code and facepalmed.

        Thanks BobRay.
          • 3749
          • 24,544 Posts
          Glad I could help. smiley
            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