We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 53261
    • 16 Posts
    I've been having issues with this version of ModX, every few minutes I'll get a white screen on the front-end or an undefined error in the back-end. Clearing the cache resolves this but I'm having to do it every few minutes, I've installed an error log and the re-occurring error I'm getting is either 'PHP Parse error: syntax error, unexpected '<' in .../public_html/core/cache/includes/elements/modplugin/4.include.cache.php on line 60' or 'PHP Parse error: syntax error, unexpected '<' in ../public_html/core/cache/includes/elements/modplugin/2.include.cache.php on line 79'.

    I've increased the memory but it's had no effect.

    Looking forward to reading your replies.
      • 17301
      • 932 Posts
      Is the MODX error log posting out the same error? Anything additional?
        ■ email: [email protected] | ■ website: https://alienbuild.uk

        The greatest compliment you can give back to us, is to spend a few seconds leaving a rating at our trustpilot: https://uk.trustpilot.com/review/alienbuild.uk about the service we provided. We always drop mention of services offered by businesses we've worked with in the past to those of interest.
        • 53261
        • 16 Posts
        Quote from: lkfranklin at Feb 27, 2017, 04:32 PM
        Is the MODX error log posting out the same error? Anything additional?

        The Modx error log rarely posts anything which leads me to believe it's definitely a caching issue.
          • 17301
          • 932 Posts
          From my experience it usually happens when a getresources/getpage call isn't wrote correctly and it ends up getting something an infinite amount of times until the server crashes.
            ■ email: [email protected] | ■ website: https://alienbuild.uk

            The greatest compliment you can give back to us, is to spend a few seconds leaving a rating at our trustpilot: https://uk.trustpilot.com/review/alienbuild.uk about the service we provided. We always drop mention of services offered by businesses we've worked with in the past to those of interest.
            • 22840
            • 1,572 Posts
            If you look at the files 4.include.cache.php and 2.include.cache.php in core/cache/includes/elements/modplugin/ it will tell you near the top what addons they are, might help to debug it
              • 3749
              • 24,544 Posts
              You can also look in the Plugins section of the Elements tree and see what the plugins with the IDs 2, and 4 are (in parentheses after the plugin name in the tree). If there are updates available for those plugins, updating them may solve your problem.

              The "unexpected <" error often means that a processor (most likely called by an extra) is throwing a PHP syntax error or warning. MODX processors return JSON, so things crash if they return something else (i.e., the HTML of a PHP error or warning message). Unless the plugin has good sanity checks, the crash will occur before anything can be written to the MODX Error Log.

              See this for some ideas on how to see the actual error message: http://bobsguides.com/blog.html/2013/05/22/debugging-cmps-a-horror-story/.

              My guess is that the root of the problem is not the cache. It's an extra that doesn't play well with that version of MODX. I could be wrong.
                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
                • 53261
                • 16 Posts
                Thanks for the replies, I've removed three conflicting plugins but it's still not working. Neither the ModX error log or my error log captures the error, it just white screens/undefines in the backend.
                  • 3749
                  • 24,544 Posts
                  Did you manually delete the files in the core/cache directory after removing the plugins? Plugin code can be somewhat zombie-like in the script cache.
                    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
                    • 53261
                    • 16 Posts
                    Quote from: BobRay at Feb 28, 2017, 03:21 PM
                    Did you manually delete the files in the core/cache directory after removing the plugins? Plugin code can be somewhat zombie-like in the script cache.

                    The core/cache folder? I've been deleting it everytime the site goes down, the error isn't posting in my error log anymore either.