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

    I've been trying for over 2 hours now to get it straight, but I can't seem to get it to work.

    The problem is amazingly simple: I want to use the default Wayfinder technique to list a list of resources from "web" in "dashboard", both of which are fully working contexts. The ACLs are fine and everything is configured the way it's meant to, but I'm not getting ANY output out of Wayfinder.

    Currently using this setup:

    [[WayFinder?
    	&startId=`71`
    	&startIdContext=`web`
    	&contexts=`web`
    	&limit=`4`
    	&level=`1`
    	&sortBy=`publishedon`
    	&sortOrder=`DESC`
    	&ignoreHidden=`1`
    	&cacheResults=`1`
    	&rowTpl=`@INLINE:<li><a href="[[+wf.link]]">[[+wf.linktext]]</a>[[+wf.wrapper]]</li>`
    ]]
    


    Resource #71 is in Context "web", wheras this piece of code is in the template assigned to the Home (site_start) resource from "dashboard".
    I've tried both `context` and `startIdContext`, toggled them both (once without context, then once without startIdContext) and still nothing.
    Sometimes `cacheResults` seems to work but then again it doesn't, which is FRAKKING annoying and also VERY strange.

    See, I can simply build this code in my own snippet, but that seems far fetched as Wayfinder offers the functionality.

    Help? smiley
      @MarkGHErnst

      Developer at Adwise Internetmarketing, the Netherlands.
      • 24865
      • 289 Posts
      Oh, in addition, I've tried both without cookies, completely logged out and SU login in the manager AND frontend context. Still no cigar.
      The strange part is, if I enter the raw SQL query I pulled out of the wayfinder.class.php, I get the exact resources I need, but when Wayfinder is done, nothin'.
        @MarkGHErnst

        Developer at Adwise Internetmarketing, the Netherlands.
      • This is why I've quit using contexts except for multiple domains, subdomains, or subdirectories. As far as I can tell, there is no way to simply provide a link to a page in another context without jumping through all kinds of plugin/rewrite hoops. If I recall correctly, contexts were originally developed specifically to provide a way to manage multiple domains on one Revo installation.
          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
          • 18608
          • 112 Posts
          Can't figure out if it could be it. But have you set the System Setting "allow_forward_across_contexts" to Yes?
            Mathias Dannevang | Webdesigner at dannevang.org | Tweets @dannevang
            • 24865
            • 289 Posts
            @ Susan
            Totally agree with you, this is indeed another domain (currently a subdomain, but will be a unique domain). It switches contexts (modX::switchContext) when it loads in OnHandleRequest, before any loading of resources. The core is an 5380 line long Extension Package, loaded in modX::loadExtensionPackages.

            /edit
            To further clarify the idea behind it, is that the subdomain (or spin off of the main website) can still display a single usefull folder as a top menu AND display news from the main website, naturally using the &scheme=`full` param to get the full links from site_url (and optionally base_url).

            @ Mathias
            Yep, got it all set up. smiley
              @MarkGHErnst

              Developer at Adwise Internetmarketing, the Netherlands.
              • 2249
              • 60 Posts
              I've pretty much given up with wayfinder altogether Its pretty simple to just write a simple snippet to retrieve docs/menu items and you will find it will run quicker than wayfinder.

              Let me know if you need an example posting.

              Cheers
              Ash
                • 24865
                • 289 Posts
                @ Ash
                No thanks, I would still like to find a decent solution for Wayfinder as it is already 'there'. I can easily create the snippet myself, but to save time (which is kinda obsolete right now) I tried Wayfinder. Still, I think it's worth figuring out of this is a BUG or if I am doing something wrong. smiley
                  @MarkGHErnst

                  Developer at Adwise Internetmarketing, the Netherlands.
                  • 10484
                  • 32 Posts
                  This sounds similar to this thread. http://forums.modx.com/index.php/topic,58566.0.html

                  Contexts and ACLs can cause a bit of overlooking. Be sure you're logged in to all the contexts, including both web and your custom context. Hope the link helps!
                    Garret Overstreet
                    Business and Marketing Consultant
                    • 24865
                    • 289 Posts
                    I thought so as well, but I am definitely logged in as the super user/administrator... Strange enough I'm still getting the raw query results so it's definitely Wayfinder messing stuff up...
                      @MarkGHErnst

                      Developer at Adwise Internetmarketing, the Netherlands.
                      • 24865
                      • 289 Posts
                      Okay now it's just getting weird.

                      [[~42]] generates a perfect link to the contact page, but on the other context, using the exact same technique, it's just EMPTY. When I then, in turn, call the chunk UNCACHED, it ALL works fine.

                      Wtf?!
                        @MarkGHErnst

                        Developer at Adwise Internetmarketing, the Netherlands.