View Issue Details

IDProjectCategoryView StatusLast Update
0005597OXID eShop (all versions)4.06. Language and translationspublic2023-11-24 09:00
Reporterwhefter Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
PlatformAllOSAllOS VersionAll
Product Version4.8.1 / 5.1.1 
Summary0005597: Language setting by URL ?lang= parameter ignored for multilang environments with multiple non-ssl domains and single SSL domain
DescriptionSetup:

- Oxid EE 5.1.1, a supershop with a few sub-shops.

- One of these sub-shops, call it "myshop", has a base url (http://www.myshop.de) and base ssl url (https://www.myshop.de) configured in the "Mall" tab.

- Multiple languages, their Base URLs configured as such
-- de: http://www.myshop.de / https://www.myshop.de
-- en: http://www.myshop.com / https://www.myshop.de
-- fr: http://www.myshop.fr / https://www.myshop.de

- Note that the SSL domain remains the same for all languages

With the setup it is not possible to access the SSL domain in any language but German; this also means that as soon as a user goes past step 2 in the order process, the shop switches to the SSL domain and thus to German.

The ?lang= parameter is ignored when trying to access the SSL domain in another language, e.g. calling https://www.myshop.de/?lang=1 leads to the German SSL shop.
Steps To ReproduceSee description.
Additional InformationPossible fix:

oxlang.php, line 149 (EE 5.1.1):

enclose
            //or determining by domain
            $aLanguageUrls = $myConfig->getConfigParam( 'aLanguageURLs' );

            if ( !$blAdmin && is_array( $aLanguageUrls ) ) {
                foreach ( $aLanguageUrls as $iId => $sUrl ) {
                    if ( $sUrl && $myConfig->isCurrentUrl( $sUrl ) ) {
                        $this->_iBaseLanguageId = $iId;
                        break;
                    }
                }
            }

as such:
            if ( is_null( $this->_iBaseLanguageId ) ) {
                //or determining by domain
                if ( !$blAdmin && is_array( $aLanguageUrls ) ) {
                    foreach ( $aLanguageUrls as $iId => $sUrl ) {
                        if ( $sUrl && $myConfig->isCurrentUrl( $sUrl ) ) {
                            $this->_iBaseLanguageId = $iId;
                            break;
                        }
                    }
                }
            }
Issue: Calling www.myshop.de/?lang=1 displays the english shop (or whichever language has id=1), but does not redirect to www.myshop.com
TagsDocumentation, EE
ThemeNot defined
BrowserAll
PHP VersionNot defined
Database VersionNot defined

Activities

whefter

2014-01-09 11:04

reporter   ~0009395

Last edited: 2014-01-09 11:04

Typo in the fix, sorry, the replacement should obviously be:

            if ( is_null( $this->_iBaseLanguageId ) ) {
                //or determining by domain
                $aLanguageUrls = $myConfig->getConfigParam( 'aLanguageURLs' );

                if ( !$blAdmin && is_array( $aLanguageUrls ) ) {
                    foreach ( $aLanguageUrls as $iId => $sUrl ) {
                        if ( $sUrl && $myConfig->isCurrentUrl( $sUrl ) ) {
                            $this->_iBaseLanguageId = $iId;
                            break;
                        }
                    }
                }
            }

jurate.baseviciene

2014-02-04 15:06

reporter   ~0009467

Reminder sent to: whefter

Hi,

 As we saw, you already submitted a complete solution for this issue. If you feel fancy, you'd also have the possibility to contribute your changes directly to our GitHub repository on https://github.com/OXID-eSales/oxideshop_ce/. [^] [^] Please leave a note there with the bug number you fixed so we can close this issue in the bug tracker."

Best regards

tomas_liubinas

2014-08-28 16:31

reporter   ~0010107

Last edited: 2014-08-29 09:23

This is not a bug, this is a misconfiguration. You supply same (www.myshop.de) domain as a language specific domain for a few languages and shop recognizes the first available language (DE) as fitting to this domain, therefore as soon as you switch to this domain the default language is set, and host is taken as priority over lang param in this case. Thus language specific domain should be used just for a single language.

Back to your example. If you want to use a single https domain for all languages please try the following configuration:

Base subshop URL: http://www.myshop.de
Base subshop SSL URL: https://www.myshop.de

DE URL: (none)
DE SSL URL: (none)

EN URL: http://www.myshop.com
EN SSL URL: (none)

FR URL: http://www.myshop.fr
FR SSL URL: (none)

jurate.baseviciene

2014-08-29 09:31

reporter   ~0010108

Last edited: 2014-08-29 12:20

This bug is left with status as confirmed, because we have missing documentation.

SvenBrunk

2023-11-24 09:00

administrator   ~0015926

From the documentation: "The top-level domain (TLD), the second-level domain, the subdomain or any combination thereof for this URL must be different from those of the other Enterprise Edition shops"