We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 14786
    • 57 Posts
    I was going to post this in the snippet/plugin forum but I’m not 100% sure its a problem with wayfinder.

    I have document and user groups setup for certain site sections to be members only private access. When a document is set to document group "Site Members" it disappears from wayfinder’s menu. The problem is it doesn’t appear in the menu even when a user in the correct group is logged in. I’ve looked at the snippet code and found this line #350:
    <?php
    	        $access = ($modx->isFrontend() ? "sc.privateweb=0" : "1='{$_SESSION['mgrRole']}' OR sc.privatemgr=0").(!$docgrp ? "" : " OR dg.document_group IN ({$docgrp})");
    


    Changing "sc.privateweb=0" to "sc.privateweb=0 OR sc.privateweb=1" causes the private documents to appear in the menu regardless of the user’s log in state.

    I thought it might be a problem with WebLogin snippet but that appears to be working. If I try to go to a private page directly it allows me to view it when logged in and redirects when logged out.
      • 29181
      • 480 Posts
      My first thought on this is...are you calling Wayfinder cached?
        Adrian Lawley: www.adrianlawley.com
        • 14786
        • 57 Posts
        that did it, its usually a simple answer
          • 29181
          • 480 Posts
          We’ve all been there...Glad it’s sorted!

          Taff
            Adrian Lawley: www.adrianlawley.com