[Solved]Install problem - MLE diff 1.3.1 Language pages not loading, admin OK

This is a FORK of the CMS Made Simple project and is not oficially supported in any way by the CMS Made Simple development team.
Locked
jk
Forum Members
Forum Members
Posts: 30
Joined: Thu Dec 04, 2008 4:47 pm

[Solved]Install problem - MLE diff 1.3.1 Language pages not loading, admin OK

Post by jk »

Hi,

I am adding languages to a 1.3.1 version of CMSMS.  I have used the relevant version of MLE and followed the install instructions.  I have the admin area working fine - I have all my content and menu names added in English (default) and Portuguese.  I can edit these fine in both languages and the global includes are there in both languages.  But when I go to the home page and click the Portuguese flag the url appears with the pt name but the content is only there in English. 

I have looked through all the videos and the forum but I can not see where I have gone wrong and I have not been able to find a similar problem recorded.  Has anyone seen this before and does anyone have any idea what is likley to be causing this?

By the way my lang.config file is as follows.

define('DEFAULT_LANG', 'en_US');

$hls = array(
'en_US' => array(
'block'=>'en',
'flag'=>'',
'text'=>'English',
'locale'=>'en_US',
),
'pt' => array(
'block'=>'pt',
'flag'=>'',
'text'=>'Portuguese',
'locale'=>'pt',
),

);
?>

Thanks for any help,  JK :-\
Last edited by jk on Sat Mar 07, 2009 1:35 pm, edited 1 time in total.
User avatar
seensite
Forum Members
Forum Members
Posts: 173
Joined: Sun Feb 10, 2008 7:36 pm

Re: Install problem - MLE diff 1.3.1 Language pages not loading, admin OK

Post by seensite »

Hello JK,

As there is no website url in your message it is a little difficult to understand your problem, but.. Why not upgrading to version 1.5.2 "Caguas" before building the rest of your website ? Many improvements were done and security issues fixed since v1.3.1.

Best regards
The universe of information technology is constantly growing and contains only emerging products built on successive patches
jk
Forum Members
Forum Members
Posts: 30
Joined: Thu Dec 04, 2008 4:47 pm

Re: Install problem - MLE diff 1.3.1 Language pages not loading, admin OK

Post by jk »

Thanks for the quick post - but this is not my site and I do not have the budget for the upgrade.   Also I suspect it is something I did incorrectly in the database so I really need to work out what.
alby

Re: Install problem - MLE diff 1.3.1 Language pages not loading, admin OK

Post by alby »

jk wrote: Also I suspect it is something I did incorrectly in the database so I really need to work out what.
I see something of not correct (a mix from config_lang.php.alby and config_lang.php.alby.label).
local is for set a correct locale for your server, if correct (example in windows environment only) the set 'locale_cms'=>'pt_PT'

Alby
jk
Forum Members
Forum Members
Posts: 30
Joined: Thu Dec 04, 2008 4:47 pm

Re: Install problem - MLE diff 1.3.1 Language pages not loading, admin OK

Post by jk »

Thanks Alby,

I have changed the locale as you suggested, cleared my browser history and the site cache and the problem is still there.  I have attached a document that includes images of the database structure and my current config file is repeated below.  I have used this mod on a similar aged site and it works a treat - I have compared the two sites and can not see any differences. I must have done something stupid but I can not work out what. It is probably because it is late on a Friday and I need a beer!

define('DEFAULT_LANG', 'en_US');

$hls = array(
'en_US' => array(
'block'=>'en',
'flag'=>'',
'text'=>'English',
'locale'=>'en_US',
),
'pt' => array(
'block'=>'pt',
'flag'=>'',
'text'=>'Portuguese',
'locale'=>'pt_PT',
),

);
?>

Any ideas greatly appreciated.
JK
Attachments

[The extension pdf has been deactivated and can no longer be displayed.]

alby

Re: Install problem - MLE diff 1.3.1 Language pages not loading, admin OK

Post by alby »

jk wrote: I have changed the locale as you suggested, cleared my browser history and the site cache
and always clean cookie for your site
have you enable debug in config.php and check your error server logs?

Alby
jk
Forum Members
Forum Members
Posts: 30
Joined: Thu Dec 04, 2008 4:47 pm

Re: Install problem - MLE diff 1.3.1 Language pages not loading, admin OK

Post by jk »

Thanks again for the response Alby.  I had cleared the cache in the admin too.

I had a go with the error log yesturday but I did not get very far.  The error log says this;
[05-Mar-2009 04:48:28] PHP Notice:  Undefined index:  en_US in /home/fili/public_html/include.php on line 246
[05-Mar-2009 04:48:28] PHP Notice:  Undefined index:  en_US in /home/fili/public_html/include.php on line 250

The lines of code they refer to are as follows.

Line 246      $mleblock = '_'.$hls[$hl]['block'];
               if(!empty($default_lang_fallback) && (DEFAULT_LANG != $hl)) $mleblockfallback = '_'.$hls[DEFAULT_LANG]['block'];
              $mlelocale_cms = (isset($hls[$hl]['locale_cms']))?$hls[$hl]['locale_cms']:$hl;
              $mlelocale = (isset($hls[$hl]['locale']))?$hls[$hl]['locale']:$mlelocale_cms;
Line 250     $mleparent = (isset($hls[$hl]['parent']))?$hls[$hl]['parent']:$hls[$hl]['block'];


I checked my global settings in the admin.  My 'Default language for the frontend': is set to english
and my preferences for MLE are
Force initial DEFAULT_LANG: checked
Show from DEFAULT_LANG if current lang is not ready: checked
Opacity text replace: opacity:1;
Opacity flags percent: 50

Does this mean more to you than it does to me?
JK
Last edited by jk on Fri Mar 06, 2009 7:34 pm, edited 1 time in total.
alby

Re: Install problem - MLE diff 1.3.1 Language pages not loading, admin OK

Post by alby »

jk wrote: I had a go with the error log yesturday but I did not get very far.  The error log says this;
[05-Mar-2009 04:48:28] PHP Notice:  Undefined index:  en_US in /home/fili/public_html/include.php on line 246
[05-Mar-2009 04:48:28] PHP Notice:  Undefined index:  en_US in /home/fili/public_html/include.php on line 250

The lines of code they refer to are as follows.

Line 246      $mleblock = '_'.$hls[$hl]['block'];
               if(!empty($default_lang_fallback) && (DEFAULT_LANG != $hl)) $mleblockfallback = '_'.$hls[DEFAULT_LANG]['block'];
              $mlelocale_cms = (isset($hls[$hl]['locale_cms']))?$hls[$hl]['locale_cms']:$hl;
              $mlelocale = (isset($hls[$hl]['locale']))?$hls[$hl]['locale']:$mlelocale_cms;
Line 250     $mleparent = (isset($hls[$hl]['parent']))?$hls[$hl]['parent']:$hls[$hl]['block'];
Very strange because you have $hls['en_US']

jk wrote: I checked my global settings in the admin.  My 'Default language for the frontend': is set to english
and my preferences for MLE are
Force initial DEFAULT_LANG: checked
Show from DEFAULT_LANG if current lang is not ready: checked
- you don't must select a default language for frontend (must be set with DEFAULT_LANG)
- uncheck Force DEFAULT_LANG if current lang is not ready, in this mode you check if pt_PT works

Alby
jk
Forum Members
Forum Members
Posts: 30
Joined: Thu Dec 04, 2008 4:47 pm

Re: Install problem - MLE diff 1.3.1 Language pages not loading, admin OK

Post by jk »

I sent Alby my website address and he had a look and suggested it was a problem with the mod rewrite.  This made me think .htaccess.  I stripped out all the excess code from my htaccess file and just put in the basics (see below) and the site worked perfectly.  I added the other code in line by line but the site did not break so I can not tell you which bit caused the conflict. If you have this porblem I can suggest you do what I did - start with the htaccess code below and then add any extra bits you want peice by peice - testing the site in between each code addition.


# Read FAQ: http://wiki.cmsmadesimple.org/index.php ... retty_URLs also
Options +FollowSymLinks
RewriteEngine on

# Change to RewriteBase /cms/ if CMSMS is installed in this subdirectory
RewriteBase /

# 301 Redirect all requests that don't contain a dot or trailing slash to
# include a trailing slash
RewriteCond %{REQUEST_URI} !/$
RewriteCond %{REQUEST_URI} !\.
RewriteRule ^(.*) %{REQUEST_URI}/ [R=301,L]

# Rewrites urls in the form of /parent/child/
# but only rewrites if the requested URL is not a file or directory
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# COMMENT Monolingual rule and UNCOMMENT MLE rule
#RewriteRule ^(.+)$ index.php?page=$1 [QSA]
RewriteRule ^([^/]+)/(.+)$ index.php?page=$2&hl=$1 [QSA]
Locked

Return to “[locked] CMSMS MLE fork”