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.
do they have the permissions for all contexts?
All language contexts have public pages only so far, so anonymous works and I believe every user has anonymous rights as well - or?
-
ā 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.
OK - contexts were load only.
Changed to load, list, view, cleared cache, reload permissions ... no change
... 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!