View Issue Details

IDProjectCategoryView StatusLast Update
0004995OXID eShop (all versions)4.07. Source code, Testpublic2015-05-04 15:21
Reportermbertram 
PriorityhighSeveritycriticalReproducibilityalways
Status resolvedResolutionfixed 
Product Version4.7.3 / 5.0.3 revision 54408 
Target Version4.7.5 / 5.0.5Fixed in Version4.7.4 / 5.0.4 revision 57063 
Summary0004995: getOutUrl with SSL get wronk ssl-url for subshops
DescriptionHi,

if ssl is active, the method "getOutUrl" in oxconfig (line 1421) returns the wrong url.

In line 1430 the url is set by:
$sUrl = $this->getConfigParam('sSSLShopURL');

But it must be:
$sUrl = $this->getConfigParam('sMallSSLShopURL') . '/';

Now it returns the ssl-url configured in the config.inc.php and not the subshop url, configured in backend.

Without a ssl-url in the config.inc.php file, the css and js files will be include relative and the page can't be loaded with a seo-url.
Steps To Reproduce1. Define no ssl-url in config.inc.php
2. Create a subshop with ssl-url
3. Open the shop with a ssl-url (example: https://www.shop-domain.de/mein-konto)
4. The css and js files are loaded relative without a url
TagsHTTPS
ThemeBoth
BrowserAll
PHP Versionany
Database Versionany

Relationships

has duplicate 0004979 resolved Offline-Page of subshops is called by wrong URL 

Activities

martinwegele

2013-03-19 11:26

reporter   ~0008514

Maybe this is related to 0004979?

Linas Kukulskis

2013-04-09 13:11

reporter   ~0008579

dublicated

mbertram

2013-05-08 17:39

reporter   ~0008690

I get this bug in OXID EE 5.0.5, too.

Problem is the function getOutUrl in oxconfig.php.

There is used getConfigParam('sShopURL'). But it musst be getConfigParam( 'sMallShopURL' ).

Same with SSL:
incorrect: $sUrl = $this->getConfigParam('sAdminSSLURL').'../';
correct: $this->getConfigParam('sMallSSLShopURL')

complete function:
    public function getOutUrl( $blSSL = null , $blAdmin = null, $blNativeImg = false )
    {
        $blSSL = is_null($blSSL)?$this->isSsl():$blSSL;
        $blAdmin = is_null($blAdmin)?$this->isAdmin():$blAdmin;

        if ( $blSSL ) {
            if ($blNativeImg && !$blAdmin) {
                $sUrl = $this->getSslShopUrl();
            } else {
                $sUrl = $this->getConfigParam('sSSLShopURL');
                if (!$sUrl && $blAdmin) {
                    $sUrl = $this->getConfigParam('sAdminSSLURL').'../';
                }
            }
        } else {
            $sUrl = ($blNativeImg && !$blAdmin )?$this->getShopUrl():$this->getConfigParam( 'sShopURL' );
        }

        return $sUrl.$this->_sOutDir.'/';
    }



fixed version:
    public function getOutUrl( $blSSL = null , $blAdmin = null, $blNativeImg = false )
    {
        $blSSL = is_null($blSSL)?$this->isSsl():$blSSL;
        $blAdmin = is_null($blAdmin)?$this->isAdmin():$blAdmin;

        if ( $blSSL ) {
            if ($blNativeImg && !$blAdmin) {
                $sUrl = $this->getSslShopUrl();
            } else {
                $sUrl = $this->getConfigParam('sMallSSLShopURL').'/';
                if (!$sUrl && $blAdmin) {
                    $sUrl = $this->getConfigParam('sAdminSSLURL');
                }
            }
        } else {
            $sUrl = ($blNativeImg && !$blAdmin )?$this->getShopUrl():$this->getConfigParam( 'sMallShopURL' ).'/';
        }

        return $sUrl.$this->_sOutDir.'/';
    }

Linas Kukulskis

2013-05-09 09:12

reporter   ~0008691

no any more changes needed.

this line:
$sUrl = ($blNativeImg && !$blAdmin )?$this->getShopUrl():$this->getConfigParam( 'sShopURL' );

is correct. do not forget that there is blNativeImg - parameter pased, which control generate url from main shop or from subshop