We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 38970
    • 59 Posts
    Hey Guys,

    Dont know exactly what happened but today I cleared out the site cache and when i clear out the cache I get the following:

    Console running...
    Processing automatic publishing dates
    -> 0 documents were published.
    -> 0 documents were unpublished.
    Error caching time of next auto publishing event
    Could not cache context settings for mgr.
    Could not cache context settings for web.


    I went over to the error log and I see this:

     [2012-07-05 20:04:32] (ERROR @ /maps/connectors/resource/index.php) Could not cache context settings for mgr.
    [2012-07-05 20:04:32] (ERROR @ /maps/connectors/resource/index.php) Error caching lexicon topic lexicon/en/core/default
    [2012-07-05 20:04:32] (ERROR @ /maps/connectors/resource/index.php) Error caching action map mgr/actions
    [2012-07-05 20:04:32] (ERROR @ /maps/connectors/resource/index.php) Error caching lexicon topic lexicon/en/core/resource
    [2012-07-05 20:04:32] (ERROR @ /maps/connectors/resource/index.php) Error caching lexicon topic lexicon/en/core/context
    [2012-07-05 20:04:32] (ERROR @ /maps/connectors/resource/index.php) Could not cache context settings for web.
    [2012-07-05 20:04:33] (ERROR @ /maps/connectors/system/registry/register.php) Could not cache context settings for mgr.
    [2012-07-05 20:04:33] (ERROR @ /maps/connectors/system/registry/register.php) Error caching lexicon topic lexicon/en/core/default
    [2012-07-05 20:04:33] (ERROR @ /maps/connectors/system/registry/register.php) Error caching action map mgr/actions
    [2012-07-05 20:04:34] (ERROR @ /maps/index.php) Could not cache context settings for web.
    [2012-07-05 20:04:34] (ERROR @ /maps/index.php) Error caching script elements/modplugin/7
    [2012-07-05 20:04:34] (ERROR @ /maps/index.php) Error caching script elements/modsnippet/30
    [2012-07-05 20:04:34] (ERROR @ /maps/index.php) Error caching script elements/modsnippet/67
    [2012-07-05 20:04:34] (ERROR @ /maps/index.php) Error caching lexicon topic lexicon/en/wayfinder/properties
    [2012-07-05 20:04:34] (ERROR @ /maps/index.php) Error caching lexicon topic lexicon/en/wayfinder/properties
    [2012-07-05 20:04:34] (ERROR @ /maps/index.php) Error caching script elements/modsnippet/19
    [2012-07-05 20:04:34] (ERROR @ /maps/index.php) Error caching script elements/modsnippet/5
    [2012-07-05 20:04:34] (ERROR @ /maps/index.php) context for 3 is web
    [2012-07-05 20:04:34] (ERROR @ /maps/index.php) Error caching script elements/modsnippet/33
    [2012-07-05 20:04:34] (ERROR @ /maps/index.php) Error caching lexicon topic lexicon/en/quip/default
    [2012-07-05 20:04:36] (ERROR @ /maps/index.php) Could not cache context settings for web.
    [2012-07-05 20:04:36] (ERROR @ /maps/index.php) Could not cache context settings for web.
    [2012-07-05 20:04:36] (ERROR @ /maps/index.php) Could not cache context settings for web.
    [2012-07-05 20:04:36] (ERROR @ /maps/index.php) Could not cache context settings for web.
    [2012-07-05 20:04:36] (ERROR @ /maps/manager/index.php) Could not cache context settings for mgr.
    [2012-07-05 20:04:36] (ERROR @ /maps/manager/index.php) Error caching lexicon topic lexicon/en/core/default
    [2012-07-05 20:04:36] (ERROR @ /maps/manager/index.php) Error caching action map mgr/actions
    [2012-07-05 20:04:36] (ERROR @ /maps/manager/index.php) Error caching lexicon topic lexicon/en/core/dashboard
    [2012-07-05 20:04:36] (ERROR @ /maps/manager/index.php) Error caching lexicon topic lexicon/en/core/topmenu
    [2012-07-05 20:04:36] (ERROR @ /maps/manager/index.php) Error caching lexicon topic lexicon/en/core/file
    [2012-07-05 20:04:36] (ERROR @ /maps/manager/index.php) Error caching lexicon topic lexicon/en/core/action
    [2012-07-05 20:04:36] (ERROR @ /maps/manager/index.php) Error caching lexicon topic lexicon/en/core/action
    [2012-07-05 20:04:36] (ERROR @ /maps/manager/index.php) Error caching lexicon topic lexicon/en/core/system_events
    [2012-07-05 20:04:36] (ERROR @ /maps/manager/index.php) Error caching lexicon topic lexicon/en/gallery/default
    
    


    That is just when I visit one resource in my system.

    I have done the following already

    • Deleted /core/cache/* (after I deleted it looks like the files were repopulated)
    • I copied /setup/ back over to the web dir and ran an upgrade

    Neither of these helped fix the problem, any help would be appreciated.
      • 3749
      • 24,544 Posts
      I would check with the host to see if they've implemented suPHP or something similar. When they do that, you need to change the permissions on the MODX directories and files (usually to 755/644).


      ------------------------------------------------------------------------------------------
      PLEASE, PLEASE specify the version of MODX you are using.
      MODX info for everyone: http://bobsguides.com/modx.html
        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
        • 38970
        • 59 Posts
        all files in core/cache are 777

        ls -al | grep cache
        drwxrwxrwx 10 riu riu 4096 Jul  5 11:58 cache
        
        

        
        ls -al cache/
        total 40
        drwxrwxrwx 10 riu riu 4096 Jul  5 11:58 .
        drwxr-xr-x 13 riu riu 4096 Jun 29 21:48 ..
        drwxrwxrwx  3 riu riu 4096 Jul  5 10:07 includes
        drwxrwxrwx  2 riu riu 4096 Jul  5 11:58 logs
        drwxrwxrwx  3 riu riu 4096 Jul  5 10:07 mgr
        drwxrwxrwx  2 riu riu 4096 Jul  5 10:07 phpthumb
        drwxrwxrwx  4 riu riu 4096 Jul  5 10:07 registry
        drwxrwxrwx  2 riu riu 4096 Jul  5 11:58 rss
        drwxrwxrwx  3 riu riu 4096 Jul  5 11:58 setup
        drwxrwxrwx  2 riu riu 4096 Jul  5 11:58 system_settings
        
          • 3749
          • 24,544 Posts
          Right, under suPHP or suExec, 777 will not work.


          ------------------------------------------------------------------------------------------
          PLEASE, PLEASE specify the version of MODX you are using.
          MODX info for everyone: http://bobsguides.com/modx.html
            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
            • 38970
            • 59 Posts
            Hey Bob,

            First off want to thanks for your website, helped me with the learning curve of coding for modx.

            The only thing we do have installed is suhosin. Would that make a difference.

            Thanks
              • 38970
              • 59 Posts
              I redid the permissions to directories 775 and files 664 but this still never solved the problem. Same errors as before.
                • 3749
                • 24,544 Posts
                Sorry that didn't work. I've seen those "could not cache" error messages myself from time to time on my sites, but they'e never caused any real trouble and they've never been consistent. I don't know what causes them.


                It does look like there's a permission or ownership problem with the core/cache directory, though.



                ------------------------------------------------------------------------------------------
                PLEASE, PLEASE specify the version of MODX you are using.
                MODX info for everyone: http://bobsguides.com/modx.html
                  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
                  • 38970
                  • 59 Posts
                  Is there any reason that it would cache some files but not all ? If it was a permission problem with the core/cache directory then no files should be able to be written to that directory. Once I delete the contents of the directory it repopulates itself.
                    • 38970
                    • 59 Posts
                    PHP is running under the user as well if that makes a difference
                      • 38970
                      • 59 Posts
                      Any other suggestions anyone might have ? this is killing my error log.