Hi All
This might be one for the gurus... I am currently developing a site from scratch using the latest v2.3.2-beta1 version of SilverStripe. Why? Because the web site needs to be completely multilingual, en_US and af_ZA. I have two modules that are included, the blog module and image gallery module and I have created a custom theme for the site and modules. Now all works beautifully on my local development server, running XAMPP 2.5, but then I migrate the site to our Hetzner host and put the site in a staging directory and edit the .htaccess file to make sure the RewriteBase is correct.
I run into two snags, the first is that I got the following error:
Fatal error: Cannot use string offset as an array in /usr/www/site/staging/sapphire/core/i18n.php on line 1417
This comes from the _t() function and seems to be something to do with PHP5. I did a lot of hunting to figure out why this error is occurring and managed to fixed the problem with the following code:
if(isset($lang[$locale]))
{
if(isset($lang[$locale][$class]))
{
if(isset($lang[$locale][$class][$realEntity]))
$transEntity = $lang[$locale][$class][$realEntity];
else
$transEntity = $string;
} else
$transEntity = $string;
} else
$transEntity = $string;
Now I'm able to get access to the SilverStripe admin interface but what I notice is that the after the interface is completely loaded and I try creating a new page, or doing anything else, the interface just completely 'hangs' (if I can call it that). I check in Firebug and the AJAX requests are sent successfully and return successfully with the correct update code. I even went as far as doing a Diff on the exact same AJAX response from my local development server and the production server and all looked good, but still the admin interface is not being refreshed.
I then check, in Firebug, to see if all the .js files are loaded properly, all seems to be fine. The only difference that I could spot is that on the production server the admin interface is doing the following request:
GET http://www.site.org/staging/cms/javascript/LangSelect
which fails! This is the only lead that I have to the problem, does anybody perhaps know what might be causing this sort of thing?
I thank you in advance for your input.