2

I've installed the Address module and run Composer. I've checked the CommerceGuys/Addressing dependency is present. This was working fine, until a recent update (I'm not sure whether it was Drupal 8.2 or Address beta 4), but now the site is giving the following error.

PHP Fatal error:  Interface 'CommerceGuys\\Addressing\\Model\\AddressFormatInterface' not found in /var/www/drupal/sites8/all/modules/address/src/Entity/AddressFormatInterface.php on line 16, referer: https://www.google.com/

Can anyone halp?

James

2
  • 2
    Sounds like you updated Address outside of Composer, which lead to it getting out of sync with the underlying library. "composer update drupal/address --with-dependencies" is how you update Address (or any other Drupal module). Running it now should fix your error. Commented Oct 17, 2016 at 10:39
  • Thanks for this! Seems to have worked. Will post longer response as answer. Commented Oct 18, 2016 at 19:53

2 Answers 2

2

The command Bojan offered above did the trick:

composer update drupal/address --with-dependencies

This gave the following message:

Nothing to install or update
Generating autoload files

However, the site now displays correctly and doesn't log the message posted above.

Since it didn't seem to install anything, I presume it was the Autoload files that were the problem.

Thanks!

1
  • I also needed to restart Apache, probably because Apcu had cached this Commented Mar 19, 2022 at 16:40
2

If you update Drupal 8 with drush, and not composer, this will re-install the required address libraries:

composer require drupal/address

run in the Drupal root directory.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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