0

I am trying to run address field on my web page, but I get an error

The website encountered an unexpected error. Please try again later.

So I checked the logs and get

Error: Class 'CommerceGuys\Addressing\LocaleHelper' not found in Drupal\address\Plugin\Field\FieldFormatter\AddressDefaultFormatter->getValues() (line 286 of /var/www/mywebsite/modules/contrib/address/src/Plugin/Field/FieldFormatter/AddressDefaultFormatter.php)

I checked my composer.json file and have the following required

 "drupal/address": "~1.0",
 "commerceguys/addressing": "1.x-dev",

ran

 composer update drupal/address --with-dependencies

from https://www.drupal.org/project/address but still getting the same error, I believe the error is commerceguys/addressing, but composer update says there is nothing to be updated. Any directions to my problem will help a lot, thanks.

1

I have deleted

"commerceguys/addressing": "1.x-dev",

and reran

composer update drupal/address --with-dependencies

and it works now. I had a unstable beta and commerceguys came out with a stable version that updated their code.

  • 1
    You shouldn't need both. If you composer require drupal/address, it should pull its dependencies in. – Kevin May 18 '18 at 17:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.