We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 9207 ☆ A M B ☆
    • 2,475 Posts
    I think this may be related to a weird caching issue I’m experiencing with 2.1.3-pl: I can login to my site fine, but the chunks don’t swap, so the user always sees the "Login" link, for example, when with previous versions of Revo, this was toggling (as expected) between "Login" and "Logout" links. Is this something to do with Revo or with the Snippets?

    Login version 1.6.5-public
    Personalize 3.2.1 beta1
      • 3749
      • 24,544 Posts
      Personalize is dead simple. The relevant code would be:

      if ($modx->user->hasSessionContext($modx->context->get('key')) ) {
         $output =  $modx->getChunk($yesChunk);
      } else {
         $output = $modx->getChunk($noChunk);
      }
      
      return $output;


      You are calling it uncached, right? [[!Personalize . . .]]

      Is the Personalize tag embedded in another tag or in a chunk? If so, you could try taking it out and calling it directly in the page content. That might expose any caching issues.
        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
        • 9207 ☆ A M B ☆
        • 2,475 Posts
        Bob, I think the issue indeed relates to caching: it appears that MODx version 2.1.3 changed the behavior of the parser, and what I’m having to do is to flipflop some of the caching/uncaching bits, especially in nested Snippets (or in any nested tags). So if Personalize is directly on a page (not within a Chunk, say), then it should be uncached... but it appears that it only functions now in certain cases if it’s called CACHED. I’m having trouble putting my finger on what exactly is causing this. It’s related to this one:

        http://modxcms.com/forums/index.php/topic,67363.msg378732.html

        And I’ve filed a support request for it.