Quote from: opengeek at Nov 03, 2011, 05:25 PMHmmm, I see the problem. I don't think the Contexts as subfolder technique will work at the moment without explicitly setting the site_url for each Context. You might enter a ticket for this as an improvement.
I had the same problem and I applied this patch:
FILE: core/model/modx/modcachemanager.class.php
LINE: 52
/* generate the ContextSettings */
$results['config']= array();
if ($settings= $obj->getMany('ContextSettings')) {
foreach ($settings as $setting) {
$k= $setting->get('key');
$v= $setting->get('value');
// Pacth
if ($k == 'site_url')
{
// Replace domain for current domain
$url_parsed = parse_url($v);
$v = str_replace($url_parsed['host'], MODX_HTTP_HOST, $v);
}
I use subfolders for languages too and [[site_url]] tag is used all over the code so it is very difficult to me to find and change the code/chunks.
With this patch I change the value before it is generated in cache.
This works fine for me. I jnow it is not elegant solution but it is the most fast solution I found.