Problem/Motivation

In a multilingual custom installation profile, our profile installation, fails during the translations import with the following error:

PHP Fatal error: Call to a member function getId() on null in ...modules/contrib/address/src/Repository/CountryRepository.php on line 104.

Proposed resolution

Added an if statement and a default return value.

Remaining tasks

It needs further review.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

hostdog created an issue. See original summary.

hostdog’s picture

bojanz’s picture

hostdog’s picture

Thank you bojanz for the info.

Grimreaper’s picture

Version: 8.x-1.0-beta2 » 8.x-1.0-beta3

Hello,

I have the same problem but only when using "drush site-install".

If I have my language.entity.fr.yml in the config/install directory of my install profile, it works. But if I put it into mydistrib_core module it fails only using CLI, in the web UI it works.

Thanks @bojanz for pointing to the core issue.

  • bojanz committed 804b2fe on 8.x-1.x
    Issue #2689279 by hostdog, bojanz: PHP Fatal error: Call to a member...
bojanz’s picture

Version: 8.x-1.0-beta3 » 8.x-1.x-dev
Status: Active » Fixed

Pushed a workaround based on the one added to Commerce.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

kenorb’s picture