Page 3 of 5
Re: MLE with over 20 languages but not every page has content...
Posted: Wed Apr 09, 2008 9:57 am
by alby
moscato wrote:
yes - i've created a completely new database for that. i just did the install to test 1.2.4 and nothing else
Step:
-
TEST SITE.
1.2.4 + SVN MLE: new param view_default: display DEFAULT_LANG if empty (now no default again but if set is same behaviour of 1.2.4). View post and question 1 of
Wiedmann.
Are in SVN:
function.lang.php
function.content.php
function.global_content.php
- config_lang.php:
Code: Select all
define('DEFAULT_LANG', 'en_US');
$force_mle_default = true;
$hls = array(
'en_US' => array(
'block'=>'en',
'flag'=>'<img src="images/lang/en_US.png" style="border:0" alt="English" />',
'text'=>'English',
'locale'=>'en_US.utf8',
),
'it_IT' => array(
'block'=>'it',
'flag'=>'<img src="images/lang/it_IT.png" style="border:0" alt="Italiano" />',
'text'=>'Italiano',
'locale'=>'it_IT.utf8@euro',
),
'fr_FR' => array(
'block'=>'fr',
'flag'=>'<img src="images/lang/fr_FR.png" style="border:0" alt="Français" />',
'text'=>'Français',
'locale'=>'fr_FR.utf8@euro',
),
);
- Add in default template (Left simple navigation + 1 column):
.....
.....
{lang} {breadcrumbs starttext='You are here' root='Home' delimiter='»'}
.....
{content view_default=true}
{content block="column_right" view_default=true}
.....
{global_content name='footer' view_default=true}
- NEW page: TESTPAGE EN (content and column_right)
EN: content, column_right, footer of EN
IT: content, column_right, footer of EN
FR: content, column_right, footer of EN
- Edit TESTPAGE in FR (content and column_right)
EN: content, column_right, footer of EN
IT: content, column_right, footer of EN
FR: content, column_right of FR, footer of EN
admin part:
user/pass: testcmsms
The site will be up for 1 day
Alby
Re: MLE with over 20 languages but not every page has content...
Posted: Wed Apr 09, 2008 10:44 pm
by moscato
hi alby,
thx A LOT for the test-site. really great!
i've edited the global content block "footer" and now the "TESTPAGE EN" and my created page "TESTPAGE TOM" do not work correctly. the {content} is not displayed in english and italian (italian: english content should be displayed). french works fine, because it has it's own content.
i do not know WHAT's the problem... hmm... the problem is, that i did not find any "pattern", WHEN the problem occures. it occures if you edit the pages or global content blocks. if you for example edit french and add some content there, then english/italian is suddenly empty... but only sometimes.
what i've discovered is, that in the directory "tmp / templates_c" the corresponding files are EMPTY(!) sometimes. maybe that's the reason why the content is not displayed sometimes..?
does this help you? can you see now, what i meant?
i'm online the whole thursday, so we could have a good/fast communication
thx a lot!
best regards,
tom
Re: MLE with over 20 languages but not every page has content...
Posted: Thu Apr 10, 2008 3:39 pm
by alby
moscato wrote:
what i've discovered is, that in the directory "tmp / templates_c" the corresponding files are EMPTY(!) sometimes. maybe that's the reason why the content is not displayed sometimes..?
This is definite:
Sorry, the process does not work for the implementation of the type of caching

I come out a new release soon with old behavior.
Alby
Re: MLE with over 20 languages but not every page has content...
Posted: Thu Apr 10, 2008 11:46 pm
by moscato
oh my god. that's a bit of shock for me. i've already running CMSMS MLE for my client with the 23 languages. don't know what to do now..?
is it possible to
disable caching or to find a
good solution for this problem?
any ideas alby?
thanks!
best regards,
tom
Re: MLE with over 20 languages but not every page has content...
Posted: Fri Apr 11, 2008 2:07 pm
by alby
moscato wrote:
oh my god. that's a bit of shock for me. i've already running CMSMS MLE for my client with the 23 languages. don't know what to do now..?
is it possible to disable caching or to find a good solution for this problem?
Disabled caching is not a good solution.
However, now should be right
Test this and sunday I release new version ... after break! There are other tags/modules
Alby
Re: MLE with over 20 languages but not every page has content...
Posted: Sun Apr 13, 2008 4:07 pm
by moscato
hi alby,
i've tested your update and tried a few mixtures with content, blocks and content_blocks and different languages empty/non-empty.
result: i THINK it's working now

that's really great!!
i'm looking forward for the official update
thanks a lot!
best regards,
tom
Re: MLE with over 20 languages but not every page has content...
Posted: Sun Apr 13, 2008 4:14 pm
by alby
moscato wrote:
result: i THINK it's working now

that's really great!!
i'm looking forward for the official update
Official update (1.2.4b) come out from 10 minutes
Alby
Re: MLE with over 20 languages but not every page has content...
Posted: Sun Apr 13, 2008 4:22 pm
by moscato
oh, yes... perfect
my problem is, that i've installed 1.2.3.
is it possbile to update some files manually or to replace the important files, so that my version will work?
thx!
regards,
tom
Re: MLE with over 20 languages but not every page has content...
Posted: Sun Apr 13, 2008 7:18 pm
by alby
moscato wrote:
my problem is, that i've installed 1.2.3.
is it possbile to update some files manually or to replace the important files, so that my version will work?
FIRST BACKUP FILES+DB
Try to upgrade (overwrite) with:
1. Official
cmsmadesimple-diff-1.2.3-1.2.4.tar.gz (1.2.3 -> 1.2.4)
2.
diff-mle-vs-cmsms-1.2.4.tar.gz (1.2.4 -> 1.2.4 MLE)
Alby
Re: MLE with over 20 languages but not every page has content...
Posted: Sun Apr 20, 2008 9:27 pm
by moscato
hi alby,
sorry for my late response. had to finish a large project... but now it's done
thx a lot for the patch. i've done an upgrade from 1.2.3 to 1.2.4.b with your recommended diff-files. AND: works PERFECT NOW!
wow, i really LOVE IT
thx again for your effort and fast responses. i'm lucky to find people in this forum like you!
best regards,
tom
Re: MLE with over 20 languages but not every page has content...
Posted: Thu Apr 24, 2008 3:15 pm
by Wiedmann
Hi Alby,
I've also played with this problem, and as you know, there was also a problem with the menu for me (menutext was empty). Well, after some tests, I've found out, that the {title} was also empty.
The result, which is working for me, you can see in the attachment.
--> I don't use a param for {content}, instead I use a constant "DEFAULT_LANG_FALLBACK" in config_lang.php (for the whole page).
(BTW: It's not ready for the EXTENDED version yet. But I can do this too).
Regards,
Carsten
Re: MLE with over 20 languages but not every page has content...
Posted: Thu Apr 24, 2008 5:20 pm
by alby
Wiedmann wrote:
I've also played with this problem, and as you know, there was also a problem with the menu for me (menutext was empty). Well, after some tests, I've found out, that the {title} was also empty.
The result, which is working for me, you can see in the attachment.
--> I don't use a param for {content}, instead I use a constant "DEFAULT_LANG_FALLBACK" in config_lang.php (for the whole page).
True and perhaps others .....
Definitely not bad idea because there is a bug if you add param to content tag.
For
faster updates thought to a solution of this type:
-- config_lang.php:
$default_lang_fallback = true;
-- include.php:
$mleblockfallback = false;
and in MLE block:
if($default_lang_fallback === true) $mleblockfallback = true;
In this way, for example, class.content.inc.php becomes:
Code: Select all
+global $mleblock, $mleblockfallback;
+$this->mName = (empty($row->fields["content_name$mleblock"]) && ($mleblockfallback)) ? $row->fields["content_name$mleblockfallback"] : $row->fields["content_name$mleblock"];
+$this->mMenuText = (empty($row->fields["menu_text$mleblock"]) && ($mleblockfallback)) ? $row->fields["menu_text$mleblockfallback"] : $row->fields["menu_text$mleblock"];
and so on ...
What do you think?
Alby
Re: MLE with over 20 languages but not every page has content...
Posted: Fri Apr 25, 2008 8:06 am
by alby
alby wrote:
....................
When people are testing compilations and observing rows and rows of logs
should not do other things ........
Rewind .....
- config_lang.php:
$default_lang_fallback = true;
- include.php:
$mleblock = '';
$mleblockfallback = '';
...............
if(isset($hls))
{
...............
$mleblock = '_'. $hls[$hl]['block'];
if( ($default_lang_fallback === true) && ($hl != DEFAULT_LANG) ) $mleblockfallback = '_'. $hls[DEFAULT_LANG]['block'];
...............
}
In this way, for example, class.content.inc.php becomes:
Code: Select all
+global $mleblock, $mleblockfallback;
+$this->mName = (empty($row->fields["content_name$mleblock"]) && (!empty($mleblockfallback))) ? $row->fields["content_name$mleblockfallback"] : $row->fields["content_name$mleblock"];
+$this->mMenuText = (empty($row->fields["menu_text$mleblock"]) && (!empty($mleblockfallback))) ? $row->fields["menu_text$mleblockfallback"] : $row->fields["menu_text$mleblock"];
What do you think?
Alby
Re: MLE with over 20 languages but not every page has content...
Posted: Fri Apr 25, 2008 3:43 pm
by Wiedmann
because there is a bug if you add param to content tag.
Sorry, I'm not exactly sure what you mean: You mean there is a bug before or after applying my patch?
In this way, for example, class.content.inc.php becomes:
So the main differnce is:
- You are not using a constant, instead you are using a variable.
- There is no need to use the fallback, if we are allready on the default language.
Correct?
There is also another thing which I want change:
There are some SELECT's, which are using "SELECT *". This should also be changed. Especially for the table "cms_content".
Wiedmann wrote:The result, which is working for me, you can see in the attachment.
One hunk in the diff is wrong and can't applied (it's from another change). I've attached the correct version.
Wiedmann wrote:(BTW: It's not ready for the EXTENDED version yet. But I can do this too).
I've also attached the diff for these two files.
BTW:
If someone other want test the diffs and is not familiar with diff/patch:
Just put e.g. the file "default_content_fallback.diff.txt" in your cmsms root dir (cmsms mle 1.2.4b), go in the shell to this dir and execute:
Code: Select all
patch -p 1 < default_content_fallback.diff.txt
(on Windows you must change the fileformat from Unix to DOS)
Re: MLE with over 20 languages but not every page has content...
Posted: Fri Apr 25, 2008 8:12 pm
by alby
Wiedmann wrote:
because there is a bug if you add param to content tag.
Sorry, I'm not exactly sure what you mean: You mean there is a bug before or after applying my patch?
No, is a CMSMS bug (view my
tracker) when you add a param to content tag without block (for example: assign, oneline or
view_default) then view_param was not a good solution ....
Wiedmann wrote:
In this way, for example, class.content.inc.php becomes:
So the main differnce is:
- You are not using a constant, instead you are using a variable.
- There is no need to use the fallback, if we are allready on the default language.
Correct?
Yes, mainly to reduce the code added and unnecessary re-calculate the same thing (although it should not be empty)
Wiedmann wrote:
There is also another thing which I want change:
There are some SELECT's, which are using "SELECT *". This should also be changed. Especially for the table "cms_content".
Sure, but I wanted to avoid a real fork.
I use a site with MLE with a single language (without config_lang.php/ALTER tables) and is perfectly equal to the original
Alby