Needs work
Project:
Hosting
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 Sep 2013 at 20:45 UTC
Updated:
20 Feb 2016 at 22:38 UTC
Jump to comment: Most recent
Steps to reproduce:
1.) install aegir 7.x-3.x
2.) Add openatrium 6.x as a platform
3.) view the platform node.
I get a couple undefined indexes where OA provides a translation that is no found in the Aegir Hostmaster Drupal root.
The offending code is in hosting_package.module line 393.
function _hosting_language_name($language) {
include_once DRUPAL_ROOT . '/includes/iso.inc';
$locales = _locale_get_predefined_list();
return $locales[$language][0] . (isset($locales[$language][1]) ? ' ' . t('(@language)', array('@language' => $locales[$language][1])) : '');
}
Its pulling the list of languages from hostmaster's includes instead of the platform's.
Im not sure what the best way to correct this is, but here is a patch that fixes the errors (however, the end result is that the language title isnt shown in the language list, just the language code).
| Comment | File | Size | Author |
|---|---|---|---|
| adjust-language-name.patch | 768 bytes | chertzog |
Comments
Comment #1
anarcat commentedthe problem here is:
like most of aegir, any time we directly talk to drupal without going through the backend, it's usually a mistake. in this case, we don't talk to the right platform: we only look into hostmaster.
the proper way of doing this would be to take data that is coming from a provision-verify, but i don't remember if that data is currently provided at all by the backend, let alone stored in the frontend. in the packages tables maybe?
nevertheless, your patch looks sound.
Comment #2
chertzogFor the record, the 2 missing translations are "tyv" and "mfe".
Comment #3
ergonlogicI've seen something similar, and wondered what was causing it...
Anyway, it looks like we're tracking the profile languages in hosting_package_languages:
So I guess we should pull the data from there.
Comment #4
ergonlogicMisfiled version number?