We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 42046
    • 436 Posts
    Occasionally after a cache clear I get the same two PHP errors at the top of a page:

    Warning: include(/var/sites/mysite/public_html/core/cache/includes/elements/modplugin/18.include.cache.php) [function.include]: failed to open stream: No such file or directory in /var/sites/mysite/public_html/core/model/modx/modscript.class.php on line 151
    
    Warning: include() [function.include]: Failed opening '/var/sites/mysite/public_html/core/cache/includes/elements/modplugin/18.include.cache.php' for inclusion (include_path='.:/usr/local/lib/php') in /var/sites/mysite/public_html/core/model/modx/modscript.class.php on line 151


    Error in MODX log:

    [2013-03-12 17:13:04] (ERROR @ /manager/index.php) The menu cache could not be written.


    Has anyone else noticed this behaviour?

    Revolution: 2.2.6-pl (traditional)
    Mysql: 5.5.28-29.1
    PHP: 5.3.10 [ed. note: absent42 last edited this post 11 years, 1 month ago.]
    • Go to your Elements tab and see which plugin has the ID 18 that is the plugin causing your issues.

      Hope that gives you an idea what the real issue is.

      Good luck.
        Benjamin Marte
        Interactive Media Developer
        Follow Me on Twitter | Visit my site | Learn MODX
        • 42046
        • 436 Posts
        Thanks for the tip, I'll do a little more testing.
          • 42046
          • 436 Posts
          Disabled that plugin, now it's just going to:

          Warning: filemtime() [function.filemtime]: stat failed for /var/sites/mysite/public_html/core/cache/includes/elements/modplugin/19.include.cache.php in /var/sites/mysite/public_html/core/model/modx/modscript.class.php on line 130


          [2013-03-12 21:59:48] (ERROR @ /manager/index.php) Error caching script elements/modplugin/19
          [2013-03-12 21:59:48] (ERROR @ /manager/index.php) The menu cache could not be written.


          Which by your suggestion is now an error with plugin ID 19.
          • Try clearing all core/cache/ folder contents and make sure the directory is writable for PHP
              MODX Ambassador (NL) & Professional MODX developer
              Follow me on Twitter | Visit my page on Facebook | View my code on Github | View my script posts
              MODX e-commerce solution SimpleCart
            • It's fairly obvious that there's something tripping over itself with the caching subsystem. Even on the Cloud I regularly get errors with the cache files. For example, on my own site just now I find
              [2013-03-12 00:46:26] (ERROR @ /index.php) Could not retrieve data to cache for resource 51
              [2013-03-12 09:30:55] (ERROR @ /index.php) Could not retrieve data to cache for resource 50
              [2013-03-12 09:31:02] (ERROR @ /index.php) Could not retrieve data to cache for resource 52
              
                Studying MODX in the desert - http://sottwell.com
                Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                Join the Slack Community - http://modx.org
                • 44195
                • 293 Posts
                Hi Susan, did you ever find out the cause of those cache errors? I'm getting this on a few sites after upgrading to 2.5.5
                  I'm lead developer at Digital Penguin Creative Studio in Hong Kong. https://www.digitalpenguin.hk
                  Check out the MODX tutorial series on my blog at https://www.hkwebdeveloper.com