Found that in CommerceGuys\Addressing\Subdivision\SubdivisionRepository.php
public function getList(array $parents, string $locale = null): array
{
$definitions = $this->loadDefinitions($parents);
if (empty($definitions)) {
return [];
}
$definitionLocale = $definitions['locale'] ?? '';
$useLocalName = Locale::matchCandidates($locale, $definitionLocale);
$list = [];
foreach ($definitions['subdivisions'] as $id => $definition) {
$list[$id] = $useLocalName ? $definition['local_name'] : $definition['name'];
}
return $list;
}
Problem:
If the config has the key 'locale' and the current interface lang code is the same, then the $definition['local_name'] is undefined.
Solution:
Here are 2 ways, or delete from definitions the 'locale', or add the 'local_name' to all subdivisions in config.
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | 3486697-0.patch | 7.74 KB | nick.murza |
Issue fork address_md-3486697
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #5
nick.murza commentedComment #7
nick.murza commentedComment #8
nick.murza commentedFixed, need new release based on tag 1.0.9
Comment #9
nick.murza commentedComment #10
nick.murza commentedComment #12
nick.murza commentedComment #14
nick.murza commentedComment #15
nick.murza commentedComment #16
andrei.vesterli