Details
-
Type: Bug
-
Status: Open
-
Priority: Major
-
Resolution: Unresolved
-
Affects Version/s: 4.4.5
-
Fix Version/s: Unscheduled
-
Component/s: Core CiviCRM
-
Labels:
-
Versioning Impact:Patch (backwards-compatible bug fixes)
Description
When enabling multilingual on a multisite instance, the database schema is changed (for all domains) but only the first domain has its settings changed to indicate multisite. As a result, the other domains do crash with database errors on every page request.
Fix is not as simple as it sounds as each domain of a multisite instance can have it's own locale (ie. multinational organizations with one CiviCRM domain for each country it serves).
So enabling multisite be done as:
- load the first domain and use the locale to initialize multilingual
- for each additional domain:
- if the locale is already in multilingual, fill $dao->locales and save
- otherwise add the language to the multisite install, fill $dao->locale and save
Note the existing addLocale function will also need to be changed to be multisite friendly, this includes:
- fetching the current Core_DAO_Domain object rather than the first one
- (not quite sure) adding extra locales to all domains rather than only the current
There might be other functions in CRM_Core_I18n_Schema that also need refactoring.