MLE with over 20 languages but not every page has content...

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.
Wiedmann
Forum Members
Forum Members
Posts: 233
Joined: Wed Mar 26, 2008 1:49 am

Re: MLE with over 20 languages but not every page has content...

Post by Wiedmann »

No, is a CMSMS bug
Thanks for clearify that.
Yes, mainly to reduce the code added and unnecessary re-calculate the same thing (although it should not be empty)
OK. It's easy to change that. Will make this later. (First I must fix some other problems. Don't know at the moment if they are comming  from cmsms core or mle...)
I use a site with MLE with a single language (without config_lang.php/ALTER tables) and is perfectly equal to the original
That's clear. Changes should also work without config_lang.php/ALTER tables.

BUT:
a) "SELECT *" is evil ;-)
b) at the moment I wan't change all, only those which are affected by mle
--> With many languages and "big" pages, you can have a problem with "max_allowed_packet" from MySQL if you don't change these SELECTs.
Wiedmann
Forum Members
Forum Members
Posts: 233
Joined: Wed Mar 26, 2008 1:49 am

Re: MLE with over 20 languages but not every page has content...

Post by Wiedmann »

Will make this later.
I've changed this now.

BTW:
Changes should also work without config_lang.php/ALTER tables.
The seo-link patch is not working without these changes. I've add a new diff to the other thread.
Attachments

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

alby

Re: MLE with over 20 languages but not every page has content...

Post by alby »

Wiedmann wrote:
Will make this later.
I've changed this now.
I have apply patch and (I don't have verify this) but if you apply the comment code UNNECESSARY? in class.globalcontentoperations.inc.php maybe changes in function.global_content.php/function.html_blob.php are unnecessary

Alby
Attachments

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

alby

Re: MLE with over 20 languages but not every page has content...

Post by alby »

Wiedmann wrote:
Will make this later.
I've changed this now.
Doesn't work.
I applied the patch but if I start from DEFAULT_LANG everything is ok but if I clean cache/template_c, start from another language (with empty content), the content disappears.

I tried with patch with class.globalcontentoperations.inc.php with UNNECESSARY uncomment and also works with the old function.global_content.php

Tomorrow I can try to wade codeI try to have a look tomorrow

Alby
Wiedmann
Forum Members
Forum Members
Posts: 233
Joined: Wed Mar 26, 2008 1:49 am

Re: MLE with over 20 languages but not every page has content...

Post by Wiedmann »

Sorry Alby, less time at weekend.
--> nice weather and there was a festivity in town.
but if you apply the comment code UNNECESSARY? in class.globalcontentoperations.inc.php maybe changes in function.global_content.php/function.html_blob.php are unnecessary
You ask, why I don't change the function LoadHtmlBlobByID()? Hmm, I've not found another function where this is necessary. But we can change this too.
I applied the patch but if I start from DEFAULT_LANG everything is ok but if I clean cache/template_c, start from another language (with empty content), the content disappears.
Can you explain your complete steps?

Well, for a test I'm making these:
- Installing cmsms mle 1.2.4b (with sample data)
- apply patch
- config.php 2 languages: de, en. (default de)
- make database ready. (en is a copy of de)
- enter a cmsms admin
- create a new page (test). only put content to the default language (here de). Of course, while creating a new page, you can only put content to one page)

- access the page in brower with: "http://localhost/cmsmsnew/index.php?page=test&hl=de"
--> works
- access the page in brower with: "http://localhost/cmsmsnew/index.php?page=test&hl=en"
--> works (can see content from de lang)

- now I delete the files in "\cmsmsnew\tmp\cache" and "\cmsmsnew\tmp\templates_c".
- access the page in brower with: "http://localhost/cmsmsnew/index.php?page=test&hl=en"
--> works (can see content from de lang)

Did you make some other steps?
alby

Re: MLE with over 20 languages but not every page has content...

Post by alby »

Wiedmann wrote:
but if you apply the comment code UNNECESSARY? in class.globalcontentoperations.inc.php maybe changes in function.global_content.php/function.html_blob.php are unnecessary
You ask, why I don't change the function LoadHtmlBlobByID()? Hmm, I've not found another function where this is necessary.
During patch watching the code I realized that the functions were to be called to force each reading and in fact works

Wiedmann wrote:
I applied the patch but if I start from DEFAULT_LANG everything is ok but if I clean cache/template_c, start from another language (with empty content), the content disappears.
Can you explain your complete steps?

Well, for a test I'm making these:
- Installing cmsms mle 1.2.4b (with sample data)
- apply patch
- config.php 2 languages: de, en. (default de)
- make database ready. (en is a copy of de)
- enter a cmsms admin
- create a new page (test). only put content to the default language (here de). Of course, while creating a new page, you can only put content to one page)

- access the page in brower with: "http://localhost/cmsmsnew/index.php?page=test&hl=de"
--> works
- access the page in brower with: "http://localhost/cmsmsnew/index.php?page=test&hl=en"
--> works (can see content from de lang)

- now I delete the files in "\cmsmsnew\tmp\cache" and "\cmsmsnew\tmp\templates_c".
- access the page in brower with: "http://localhost/cmsmsnew/index.php?page=test&hl=en"
--> works (can see content from de lang)

Did you make some other steps?
No, in practice are same.
This is my test.

If call:
http://econtools.economia.unife.it/cmsm ... e&hl=en_US
everything is ok for en_US and other langs, but if I clean template_c call:
http://econtools.economia.unife.it/cmsm ... e&hl=fr_FR
content is empty for fr_FR and other langs

I try this evening in another system or if you have time you can check with this on your system where I already applied the patchs (inside there is also the config_lang and sql).

Alby
Last edited by alby on Mon Apr 28, 2008 12:50 pm, edited 1 time in total.
Wiedmann
Forum Members
Forum Members
Posts: 233
Joined: Wed Mar 26, 2008 1:49 am

Re: MLE with over 20 languages but not every page has content...

Post by Wiedmann »

Well, you are right. Only I don't understand, why I don't have had this effect in my previous tests...

But it's "only" a smarty cache issue. I'm going to fix this.
Wiedmann
Forum Members
Forum Members
Posts: 233
Joined: Wed Mar 26, 2008 1:49 am

Re: MLE with over 20 languages but not every page has content...

Post by Wiedmann »

Hi Alby,
I'm going to fix this.
One day later...

Attachhed is the corrected patch. Or just apply the diff with the differences from the old patch.

Regards,
Carsten
Attachments

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

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

Wiedmann
Forum Members
Forum Members
Posts: 233
Joined: Wed Mar 26, 2008 1:49 am

Re: MLE with over 20 languages but not every page has content...

Post by Wiedmann »

Hi Alby,

I hope the last patch is working (really good to have more tester then me *g*).

Now I have an addition to "default_content_fallback.diff.txt". This now also includes $mle_translation.

Regards,
Carsten
Attachments

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

alby

Re: MLE with over 20 languages but not every page has content...

Post by alby »

Wiedmann wrote: Now I have an addition to "default_content_fallback.diff.txt". This now also includes $mle_translation.
You are a volcano of ideas  :D

Alby
Wiedmann
Forum Members
Forum Members
Posts: 233
Joined: Wed Mar 26, 2008 1:49 am

Re: MLE with over 20 languages but not every page has content...

Post by Wiedmann »

You are a volcano of ideas
Hmm, some people says: Sometimes I spent to much time in details... *g*

Of course, now I have an interessting situation:
With "default_content_fallback" and/or $mle_translation, there is no need for most of my pages, to add other pages then the page for the default_lang. Because the basic html markup is allways the same in different languages. Only the strings changes.

And if I use/integrate "my" normal PEAR::Translation2, instead of plain text files, I can translate pages in my usual way (as if I don't use cmsms).
alby

Re: MLE with over 20 languages but not every page has content...

Post by alby »

I thought to quit version 1.2.4c with the changes.

The only doubt is if apply the changes in class.globalcontentoperations.inc.php as is in SVN now, thus in editing compare the contents of GBC.

If someone can test and give a hint

Alby
Wiedmann
Forum Members
Forum Members
Posts: 233
Joined: Wed Mar 26, 2008 1:49 am

Re: MLE with over 20 languages but not every page has content...

Post by Wiedmann »

I thought to quit version 1.2.4c with the changes.
I see. Just updated my svn repository.

BTW:
You should really remove the 2 [NC] from the .htaccess.txt

(If you put @ in front of is_readable, it's hard to find an error if you are in debug mode (error_reporting E_ALL. And in normal situations this function don't raise an error, even if the given file does not exists.)

As I see you don't use the seo-patch. Maybe this can help "bizty" in the other thread.
alby

Re: MLE with over 20 languages but not every page has content...

Post by alby »

Wiedmann wrote: As I see you don't use the seo-patch. Maybe this can help "bizty" in the other thread.
This is a patch that I wanted to test more thoroughly before you include it.

Are there a couple of user who can test it?

Alby
Wiedmann
Forum Members
Forum Members
Posts: 233
Joined: Wed Mar 26, 2008 1:49 am

Re: MLE with over 20 languages but not every page has content...

Post by Wiedmann »

This is a patch that I wanted to test more thoroughly before you include it.
That's ok (and of course necessary).

(It's just, that this patch also corrects a problem, if you use the website without sessions/cookies)
Locked

Return to “[locked] CMSMS MLE fork”