in the German section of this board Josef just reported a problem with a CMSimple installation in a subfolder of a folder with 2 letters, so I had a closer look what exactly happens. The problem is the detection of $sl in cmsimple/cms.php line 120f:
Code: Select all
if (preg_match('/\/[A-z]{2}\/[^\/]*/', sv('PHP_SELF')))
$sl = strtolower(preg_replace('/.*\/([A-z]{2})\/[^\/]*/', '\1', sv('PHP_SELF')));
Code: Select all
if (preg_match('/\/[A-z]{2}\/[^\/]*$/', sv('PHP_SELF')))
$sl = strtolower(preg_replace('/.*\/([A-z]{2})\/[^\/]*$/', '\1', sv('PHP_SELF')));
Code: Select all
if (preg_match('/\/([A-z]{2})\/[^\/]*$/', sv('PHP_SELF'), $temp))
$sl = strtolower($temp[1]);
Code: Select all
if (preg_match('/\/([A-z]{2})\/index.php$/', sv('SCRIPT_NAME'), $temp)) {
$sl = strtolower($temp[1]);
}
Please note, that it was already voted upon changing the detection of secondary languages to use a special file in the language folder (as it is handled by the subsite solution) for CMSimple_XH 1.6. IMO that is the best solution in the long run, but we should nonetheless fix the long standing restriction to have no 2-letter folders in the path (I consider it a minor bug, as it seems to be unintentional) for XH 1.5.7.
Christoph