View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0005597 | OXID eShop (all versions) | 4.06. Language and translations | public | 2014-01-09 11:02 | 2023-11-24 09:00 |
Reporter | whefter | Assigned To | |||
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | All | OS | All | OS Version | All |
Product Version | 4.8.1 / 5.1.1 | ||||
Summary | 0005597: Language setting by URL ?lang= parameter ignored for multilang environments with multiple non-ssl domains and single SSL domain | ||||
Description | Setup: - 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 Reproduce | See description. | ||||
Additional Information | Possible 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 | ||||
Tags | Documentation, EE | ||||
Theme | Not defined | ||||
Browser | All | ||||
PHP Version | Not defined | ||||
Database Version | Not defined | ||||
|
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; } } } } |
|
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 |
|
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) |
|
This bug is left with status as confirmed, because we have missing documentation. |
|
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" |