Menu link to front page changes language
Menu link to front page changes language
On my site http://www.villavie.dk there s a bug that when users do the following:
I use CMSMS MLE version 1.2.4b
1. (Using IE) chose german language.
2. Browse to any page
3. Click the link to the front page
Now the danish front page is shown and not the german.
I have tried changing the content tag to {content view_deault=true} but it didn't change anything.
I use CMSMS MLE version 1.2.4b
1. (Using IE) chose german language.
2. Browse to any page
3. Click the link to the front page
Now the danish front page is shown and not the german.
I have tried changing the content tag to {content view_deault=true} but it didn't change anything.
Re: Menu link to front page changes language
What is frontend link.bizty wrote: 1. (Using IE) chose german language.
2. Browse to any page
3. Click the link to the front page
You can provide a step by step.
Alby
Re: Menu link to front page changes language
The error is only when using IE. Not safari.
To replicate the error:
1. Navigate to http://www.villavie.dk
2. Chose german language
3. Note the the text on the front page changes to german: "Ferirewohnung i Sudjutland. Wilkommen....."
3. Navigato to another page. Eg. "Zur Wohnung" (text is still in german)
3. Navigate back to the front page by clicking "Vorderseite"
4. Text is now Danish! It says "Ferielejlighed i sønderjylland. Velkommen...".
I think this is because the menu link to "Vorderseite" is to villavie.dk and not to villavie.dk/index.php?page=home&hl=de_DE
In Safari this works anyway because of some cookie or session I guess, but in Internet Explorer the Danish page is shows when following the link to the default page.
I hope this was what you wanted me to explain?
To replicate the error:
1. Navigate to http://www.villavie.dk
2. Chose german language
3. Note the the text on the front page changes to german: "Ferirewohnung i Sudjutland. Wilkommen....."
3. Navigato to another page. Eg. "Zur Wohnung" (text is still in german)
3. Navigate back to the front page by clicking "Vorderseite"
4. Text is now Danish! It says "Ferielejlighed i sønderjylland. Velkommen...".
I think this is because the menu link to "Vorderseite" is to villavie.dk and not to villavie.dk/index.php?page=home&hl=de_DE
In Safari this works anyway because of some cookie or session I guess, but in Internet Explorer the Danish page is shows when following the link to the default page.
I hope this was what you wanted me to explain?
Re: Menu link to front page changes language
Well, I have reproduced the problem.bizty wrote: The error is only when using IE. Not safari.
Safari, IE6, FF OK
IE7 not work but only first time, if I navigate again I don't have problems
Yes, IE7 have cookie problems but MenuManager with hl param has higher priority of cookie.bizty wrote: I think this is because the menu link to "Vorderseite" is to villavie.dk and not to villavie.dk/index.php?page=home&hl=de_DE
In Safari this works anyway because of some cookie or session I guess, but in Internet Explorer the Danish page is shows when following the link to the default page.
Why Forside (and Vorderseite) have the urls without hl? Are hardcoded?
Alby
Re: Menu link to front page changes language
The menu is not hardcoded it's based on the template Andreas01 downloaded from the templates section.
The menu script is
{* CSS classes used in this template:
#menuwrapper - The id for the that the menu is wrapped in. Sets the width, background etc. for the menu.
#primary-nav - The id for the
.menuparent - The class for each that has children.
.menuactive - The class for each that is active or is a parent (on any level) of a child that is active. *}
{if $count > 0}
{foreach from=$nodelist item=node}
{if $node->depth > $node->prevdepth}
{repeat string="" times=$node->depth-$node->prevdepth}
{elseif $node->depth prevdepth}
{repeat string="" times=$node->prevdepth-$node->depth}
{elseif $node->index > 0}
{/if}
{if $node->parent == true or ($node->current == true and $node->haschildren == true)}
current == true}
haschildren == true}
url}">{$node->menutext}{/foreach}
{repeat string="" times=$node->depth-1}
{/if}
Why is the menu linking to villavie.dk without hl parameter?
The menu script is
{* CSS classes used in this template:
#menuwrapper - The id for the that the menu is wrapped in. Sets the width, background etc. for the menu.
#primary-nav - The id for the
.menuparent - The class for each that has children.
.menuactive - The class for each that is active or is a parent (on any level) of a child that is active. *}
{if $count > 0}
{foreach from=$nodelist item=node}
{if $node->depth > $node->prevdepth}
{repeat string="" times=$node->depth-$node->prevdepth}
{elseif $node->depth prevdepth}
{repeat string="" times=$node->prevdepth-$node->depth}
{elseif $node->index > 0}
{/if}
{if $node->parent == true or ($node->current == true and $node->haschildren == true)}
current == true}
haschildren == true}
url}">{$node->menutext}{/foreach}
{repeat string="" times=$node->depth-1}
{/if}
Why is the menu linking to villavie.dk without hl parameter?
Re: Menu link to front page changes language
What is alias (Option tab) of this page?bizty wrote: The menu is not hardcoded it's based on the template Andreas01 downloaded from the templates section.
Alby
Re: Menu link to front page changes language
The alias was home, now I changed it to 'front', but it didn't help.
Re: Menu link to front page changes language
What happen if you call /index.php?page=ALIAS&hl=de_DEbizty wrote: The alias was home, now I changed it to 'front', but it didn't help.
Alby
Re: Menu link to front page changes language
That works fine. That is what happens when the language selector is clicked. The problem seems to be the menu not using the hl param for the default page link.
Last edited by bizty on Fri May 02, 2008 4:01 pm, edited 1 time in total.
Re: Menu link to front page changes language
Well, my mistake, default page has root_url .....bizty wrote: That works fine. That is what happens when the language selector is clicked. The problem seems to be the menu not using the hl param for the default page link.
I clear all cookies for your domain and IE works

Alby
Re: Menu link to front page changes language
My IE 6 still doesn't work after clearing the cookies. How can I change the behavior of the menu so that it doesn't link to the root url, but includes the hl parameter for all pages?
By the way, thanks a lot for helping me with this.
By the way, thanks a lot for helping me with this.
Re: Menu link to front page changes language
Default page take $config['root_url'] of config.php (SEO).bizty wrote: My IE 6 still doesn't work after clearing the cookies. How can I change the behavior of the menu so that it doesn't link to the root url, but includes the hl parameter for all pages?
By the way, thanks a lot for helping me with this.
For workaround this (but this is a hack), edit lib/classes/class.content.inc.php and comment (around #1313)
In google "problem IE6 cookie php" or "problem IE7 cookie php" there are a bunch of linksif($this->mDefaultContent) {
$url = $config['root_url']. '/';
// return $url;
}
Alby
Re: Menu link to front page changes language
Awesome! Thanks so much.
I have used your MLE version for a couple of sites now and I really like it. Things just work!
I have used your MLE version for a couple of sites now and I really like it. Things just work!
Re: Menu link to front page changes language
There is this patch that maybe resolve your problem.bizty wrote: Awesome! Thanks so much.
It's untested but if you have time of testing and report

Alby