Bob,
this solves the issue for getting the value into the database....
The first issue is a bigger issue. I investigated a little further a these are my findings.
All works well in the web context. It goes wrong in the 'it' context.
I have babel installed. So in every context i have a version of the login snippet. These are the login calls:
web context
[[!Login?
&loginTpl=`loginTpl`
&logoutTpl=`logoutTpl`
&errTpl=`lgnErrTpl`
&logoutResourceId=`1`
&loginResourceId=`13`
&redirectToPrior=`1`
&contexts=`web,it`]]
it context
[[!Login?
&loginTpl=`loginTpl`
&logoutTpl=`logoutTpl`
&errTpl=`lgnErrTpl`
&logoutResourceId=`16`
&loginResourceId=`23`
&redirectToPrior=`16`
&contexts=`it`]]
In the it context it does the redirect but the user object stays empty !!
The command
$modx->user->hasSessionContext('it')
also returns nothing.
That is why my personalise snippet is not working. Also my 'it' pages are not protected with an ACL at this point.. this is something i urgently need to get working...
When i add the web context parameter to the it version of the login snippet things starting to get ugly.
When i use my website then, after doing the login the website no longer gets redirected but gives me an 503 Error - Page not found
And in the server log i see
(ERROR @ /index.php) Could not load context: it
I also noticed that when i am logged in, in the web context and i click a link from the italian context, for example the home page (unprotected page)
the page doesn't want to go there and gives me an error instead:
(ERROR @ /index.php) Could not load context: it
I am using version 1.8.0 of the login snippet
Maybe this can also help. This is my plugin to handle the switching of the language
if($modx->context->get('key') != "mgr"){
/* grab the current langauge from the cultureKey request var */
switch ($_REQUEST['cultureKey']) {
case 'it':
/* switch the context */
$modx->switchContext('it');
break;
default:
/* Set the default context here */
$modx->switchContext('web');
break;
}
/* unset GET var to avoid
* appending cultureKey=xy to URLs by other components */
unset($_GET['cultureKey']);
}