Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Change store language on frontend leads to 404 or a search results page. 
 
woutertjez
Jr. Member
 
Total Posts:  3
Joined:  2011-07-31
 

If a visitor changes the language of my site from the default ‘nl’ to ‘en’ he will be presented with a 404 or be redirected to a search results page.

Yesterday, it seemed Magento was redirecting the visitor to the following url:
http://ecoboutique.nl/app/etc/local.xml?___store=en&___from_store=default
I have no clue where the /app/etc/local.xml is coming from.

When I manually navigated to:
http://ecoboutique.nl/?___store=en&___from_store=default
the English version of my site is loaded correctly. Then when I update the language selector from ‘en’ to ‘nl’ I do get redirected to the correct page:
http://ecoboutique.nl/?___store=default&___from_store=en

So the problem is only there when navigating from my default Dutch store view to my English store view.

Today however, when I change from the Dutch site to the English site (from the main page), I get redirected to a search results page.

This has not been a problem before. I’m running 1.6.2 for a couple of months now without much troubles.
I’m currently in the process of English language product descriptions etc for my products.

I have already flushed all caches, rebuilt all indexes, truncated the url rewrite table and had it rebuilt, and removed all search terms from magento back end.

Any help would be very much appreciated since it’s happening on my production site.

- Wouter

 
Magento Community Magento Community
Magento Community
Magento Community
 
jtroump
Member
 
Total Posts:  49
Joined:  2011-04-11
 

Hi,
Same problem with my Magento 1.6.2.
I spent more than 8 hours searching for a working solution but all my trieS failed to fix the problem.

Have you fixed it and, if yes, could you please post your solution?

Thanks in advance.

 
Magento Community Magento Community
Magento Community
Magento Community
 
mennobouma88
Jr. Member
 
Total Posts:  8
Joined:  2011-03-03
 

When you turn of all cache the problem is ‘solved’. So far i haven’t found a good solution for this bug.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Ruud Schoorl
Jr. Member
 
Total Posts:  7
Joined:  2010-07-27
IJmuiden, The Netherlands
 

I had the same problem after upgrading.

On the option value i changed $_lang->getCurrentUrl() to $_lang->getUrl();
In the file: ttemplate/page/switch/languages.phtml

ORIGINAL CODE:

<?php if(count($this->getStores())>1): ?>
<div class="form-language">
    <
label for="select-language"><?php echo $this->__('Your Language:'?></label>
    <
select id="select-language" title="<?php echo $this->__('Your Language') ?>" onchange="[removed].href=this.value">
    
<?php foreach ($this->getStores() as $_lang): ?>
        <?php $_selected 
= ($_lang->getId() == $this->getCurrentStoreId()) ? ' selected="selected"' '' ?>
        
<option value="<?php echo $_lang->getCurrentUrl() ?>"<?php echo $_selected ?>><?php echo $this->htmlEscape($_lang->getName()) ?></option>
    
<?php endforeach; ?>
    
</select>
</
div>
<?php endif; ?>

The CHanged CODE:

<?php if(count($this->getStores())>1): ?>
<div class="form-language">
    <
select id="select-language" title="<?php echo $this->__('Your Language') ?>" onchange="[removed].href=this.value">
    
<?php foreach ($this->getStores() as $_lang): ?>
        <?php $_selected 
= ($_lang->getId() == $this->getCurrentStoreId()) ? ' selected="selected"' '' ?>
        
<option value="<?php echo $_lang->getUrl() ?>"<?php echo $_selected ?>><?php echo $this->htmlEscape($_lang->getName()) ?></option>
    
<?php endforeach; ?>
    
</select>
</
div>
<?php endif; ?>

Hope this helps others!

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top