We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18174
    • 116 Posts
    Description of Problem:
    see http://tracker.modx.com/issues/10041
    Resources wont cache except "web" context resources. It looks like anything else is cached correctly, but when I look into core/cache/resource/ only the "web" context resources are cached. If the plugin revoSSL is active, resources won't be cached correctly. In system resources "cache_default" is on. If revoSSL is deactivated all runs normally.


    • MODX Version:
    • 2.2.8
    • PHP Version:
    • 5.3.26
    • Database (MySQL, SQL Server, etc) Version:
    • 5.1.68-cll
    • Error Log Contents: (attach as file if it’s too large)
    • none

    Any ideas what plugin code could affect caching?
    regards
    manu [ed. note: manu37 last edited this post 13 years, 1 month ago.]
      • 18174
      • 116 Posts
      EDIT:
      It looks like the revoSSL plugin causes the caching problems. When I deactivate the plugin, caching works normally. When it's active caching is faulty.
      I have no idea what part of the plugin affects the caching mechanism.
        • 18174
        • 116 Posts
        EDIT2:
        in the plugin code there is a getTVValue method
            case 'OnWebPageInit':
            ...
        
              $id = $modx->resourceIdentifier;
              if ( $id > 0 ){
                $resource = $modx->getObject('modResource', array('id' => $id ) );
            ...
                $tmpSSL = $resource->getTVValue('makeSSL');

        which works properly but causes the malfunction of the cache build.
        Does anybody have an answer for this?
        regards
        manu [ed. note: manu37 last edited this post 13 years, 2 months ago.]
          • 18174
          • 116 Posts
          Am I the only one with this problem?
          I placed a ticket at bugtracker but no reply till now.
          I tested it on two different installs, same effect.
          I just wonder if this is my specific or a general problem.
          regards
          manu
            • 18174
            • 116 Posts
            Sorry for bumping this issue.
            But I'm here with this problem for over a month with a large site caching not working.
            I have no clue where to search or who to ask if not here.
            Could anybody confirm this?
            best regards
            manu
              • 3749
              • 24,544 Posts
              I looked at the revoSSL plugin code, but I didn't see anything suspicious, though it may be that the redirects are causing the loss of some $_SESSION variables that are necessary for accessing the 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
                • 18174
                • 116 Posts
                Thanks for your reply, Bob. I hope I didn't wake you up.
                What irritates me is the fact that most of the calls aren't redirected at all. A http page call on page with TVvar set to "unsecure" stays as it is. But still, the cache wont be build correctly if I leave the ->getTVValue('makeSSL'); line there.
                  • 3749
                  • 24,544 Posts
                  Have you tried making sure that TV is attached to all templates and has a value for all Resources?
                    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
                    • 18174
                    • 116 Posts
                    You are right Bob, the TV is not set troughout all pages.
                    But the getTVValue method returns false on TV not present. Therefore a TV not present should be the same as TV=="not SSL" in this example. If I comment out this certain command line, all pages are called unsecured and caching works again.
                    See my bugtracker example. There I reduced the plugin code just to this command line. With the same result, caching doesn't work anymore.
                      • 3749
                      • 24,544 Posts
                      Actually, getTVValue() returns null on failure (since the TV value could be false), but I agree that it shouldn't matter. I only suggested it because MODX can get cranky when trying to get a TV that's not attached to the template of the current resource and we know that the getTVValue() line is the issue.

                      You don't have any Form Customization rules on that TV, by any chance?
                        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