We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 43899
    • 26 Posts
    I have a 4-language website working with babel.
    [0] => web
    [1] => English
    [2] => Francais
    [3] => Espagnol
    Context switching working well. Default web (German) using base url / while other contexts use /en/, /fr/ and /es/

    I am adding private pages with login plugin and the fallowing call:
    [[!Login? &contexts=`web,English,Francais,Espagnol`]]

    As soon as private user is logged in the links to 3 other contexts disappear and only web remains.
    When private user is logged out the other contexts reappear.

    MODX error log shows the following:
    [2013-06-22 17:49:28] (ERROR @ /index.php) Could not load context: English
    [2013-06-22 17:49:28] (ERROR @ /index.php) Could not load context: Francais
    [2013-06-22 17:49:28] (ERROR @ /index.php) Could not load context: Espagnol

    This is triggered by the following code in BabelLinks snippet:
    $context = $modx->getObject('modContext', array('key' => $contextKey));
    if(!$context) {
    $modx->log(modX::LOG_LEVEL_ERROR, 'Could not load context: '.$contextKey);
    continue;
    }

    Any idea what is happening here?

    I also tried the same private login in the English context.
    As a result I’m getting 503 Error, however the user is really logged in. When clicking back only WEB context available like before.
      • 4172
      • 5,888 Posts
      do they have the permissions for all contexts?
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 43899
        • 26 Posts
        All language contexts have public pages only so far, so anonymous works and I believe every user has anonymous rights as well - or?
          • 28042 ā˜† A M B ā˜†
          • 24,524 Posts
          Nope. You have to explicitly give anonymous rights to load, list, view (or whatever...) in each and every context.
            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
            • 43899
            • 26 Posts
            OK - contexts were load only.
            Changed to load, list, view, cleared cache, reload permissions ... no change
              • 43899
              • 26 Posts
              ... it took a good night sleep, but now I have set the context rights correctly for all user groups - and it works!!
              Thanks for the correct hints!