English (United Kingdom)
Jms Multi Site, formerly joomla multisite.
Create, share multiple joomla sites in few clicks !
Message
  • EU e-Privacy Directive

    This website uses cookies to manage authentication, navigation, and other functions. By using our website, you agree that we can place these types of cookies on your device.

    View e-Privacy Directive Documents

Welcome, Guest
Please Login or Register.    Lost Password?

Slave domain error when accepted language added
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: Slave domain error when accepted language added
#11209
Slave domain error when accepted language added 11 Years, 1 Month ago Karma: 0
Hello,
I have Multisites version 1.3.08 - FULL. Patches definition Version 1.3.05. Symbolic Links Forbidden. magic_quotes_gpc off

I am installing master and slave domains to the same database (prefix "master_" and slave databases prefix "{siteid}_". No accepted language in Browser features section.

Slave site works well, I see correct site content and name.

BUT
When I add accepted language in browser features section "cs-cz" for slave database, after frontend refresh it displays site content and name from master site.

Without accepted language it works well again.

====================
I checked what is a difference in config_multisites.php before change and after.
in multisites/{siteid}/config_multisites.php changed part is

BEFORE:
$newDBInfo = array( 'status' => 'Confirmed', 'fromTemplateID' => 'replicMasterDomain', 'toSiteName' => 'Coreband', 'redirect1st' => '1', 'toPrefix' => 'corebandcz_', 'setDefaultJLang' => 'cs-CZ');

AFTER:
$newDBInfo = array( 'status' => 'Confirmed', 'fromTemplateID' => 'replicMasterDomain', 'toSiteName' => 'Coreband', 'redirect1st' => '1', 'browser_langs' => 'cs-cz', 'toPrefix' => 'corebandcz_', 'setDefaultJLang' => 'cs-CZ');

I would say, that it is OK, BUT in multisites/config_multisites.php that changet part is

BEFORE:
$md_hostalias = array( 'www.coreband.cz' => array( array( 'url' => 'www.coreband.cz', 'site_id' => 'coreband.cz', 'cookie_domains' => array( '.www.coreband.cz', 'www.pilates-czech.cz') )),
'coreband.cz' => array( array( 'url' => 'coreband.cz', 'site_id' => 'coreband.cz', 'redirecturl' => 'www.coreband.cz')));

AFTER:
$md_hostalias = array( 'www.coreband.cz' => array( array( 'url' => 'www.coreband.cz', 'site_id' => 'coreband.cz', 'browser_langs' => '#cs\\-cz#i', 'cookie_domains' => array( '.www.coreband.cz', 'www.pilates-czech.cz') )),
'coreband.cz' => array( array( 'url' => 'coreband.cz', 'site_id' => 'coreband.cz', 'browser_langs' => '#en\\-uk#i', 'redirecturl' => 'www.coreband.cz')));
===================

My conclusion is that 'browser_langs' => '#cs\\-cz#i' causes that problem, because when it is present, slave site doesnot use proper dbprefix at all.


Any suggestions how to correct that problem?
Thank you very much.
Jiri
dzejdzej
Fresh Boarder
Posts: 1
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#11214
Re: Slave domain error when accepted language added 11 Years, 1 Month ago Karma: 54
The language value that you have to enter is the one sent by the "browser" and this does NOT necessarly correspond to the joomla language code.

You can enable the "browser log" file to see what the brower sent.
When a website is defined with an accepter language value and that the language does not match, this is normal that you have the master website display.
To avoid that the master is displayed, you have to add a slave site definition that is displayed when the language code is not present or wrong.

So verify the language code sent by the browser.
You can also use wildcard. So perhaps that you could enter cz*

remark: in general the browsers send the language code in lowercase and does not contain uppercase.

Enable the "browser log" in the settings menu to help you make a diagnosis of the browser language value sent by the browsers.
edwin2win
Moderator
Posts: 5370
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 1
get the latest posts directly to your desktop
2Win, Multisite(s) are trademarks of Edwin2Win.
Joomla