I'm getting the error below, only when accessing the root url of my website "/" (default context). When accessing /fr/* or any others for that matter, no errors occur.
Error log:
(ERROR @ /index.php) [OnHandleRequest]<br />
<b>Notice</b>: Undefined index: cultureKey in <b> ....\cache\includes\elements\modplugin\2.include.cache.php</b> on line <b>9</b>
It seems that it's caused when the
gateway plugin is executed:
<?php
if($modx->context->get('key') != "mgr"){
/* grab the current langauge from the cultureKey request var */
switch ($_REQUEST['cultureKey']) {
case 'en':
/* switch the context */
$modx->switchContext('english');
break;
case 'fr':
/* switch the context */
$modx->switchContext('french');
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']);
}
All context & htaccess settings should be okay. I cannot seem to figure out what's causing it, I've used this method several times without issues. Anyone?
(Rev 2.2.7, IIS 7.5)
Thnx!