Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
I have an up to date (8.x-2.x) commerce and drupal core with 2 languages : EN + FR.
I create an entity with a commerce_price field in a new module. When i enable it, i have a fatal error :
( ! ) Fatal error: Call to a member function getId() on a non-object in /modules/contrib/commerce/src/Resolver/DefaultLocaleResolver.php on line 50
Deleting FR language to only have EN default language make installation works, but if you have more than default EN language, installation will fail with this error message.
Comments
Comment #2
XanoComment #3
XanoComment #4
bojanz CreditAttribution: bojanz commentedLet's track this in #2683993: Call to a member function getId() on a non-object in DefaultLocaleResolver.