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

    This is my code
    $germanVersionUrl = $modx->makeUrl(4, 'de', '', 'full');


    makeUrl returns an empty string when I’m in the web context. However when I’m logged in as admin it works perfectly. I use this for language selection on my site. Is there a way to get the url of a ressource of another context which works always?

    Thanks
    JB
      • 13735
      • 62 Posts
      I’m sure that this is, because the anonymous user hasn’t got the necessary rights to get the url. But how can I set this up?
        • 22303 MODX Staff
        • 10,725 Posts
        Quote from: jbjoe at Apr 14, 2011, 11:01 AM

        I’m sure that this is, because the anonymous user hasn’t got the necessary rights to get the url. But how can I set this up?
        Add a Load Only policy (just needs to have the "load" permission) to the anonymous User Group for the Contexts that should be visible to anonymous users.
          • 13735
          • 62 Posts

          I have these settings for both contexts and I’ve flushed the permessions.
            • 13735
            • 62 Posts
            Solved it. I should’ve clicked "Flush all sessions" not just the option above it. Now it works!

            Thanks for the help