The Field Defaults module (https://www.drupal.org/project/field_defaults) is decribed as...

Allows batch updating of default field values to existing content. When adding a new field to an entity you can update all existing content with the default value or when editing an existing field you can choose to also update all existing content with the new value.

I have noticed that since installing the Trash module, I am no longer able to use drush updb to update the database as this results in a fatal error…

drush updb
[error]  TypeError: Drupal\field_defaults\Service\FieldDefaultsProcessor::__construct(): Argument #1 ($entityTypeManager) must be of type Drupal\Core\Entity\EntityTypeManager, Drupal\trash\TrashEntityTypeManager given in Drupal\field_defaults\Service\FieldDefaultsProcessor->__construct() (line 27 of C:\laragon\www\bit-by-bit.org\public_html\modules\contrib\field_defaults\src\Service\FieldDefaultsProcessor.php) #0 [internal function]: Drupal\field_defaults\Service\FieldDefaultsProcessor->__construct(Object(Drupal\trash\TrashEntityTypeManager), Object(Drupal\Core\Config\ConfigFactory))
#1 C:\laragon\www\bit-by-bit.org\public_html\vendor\symfony\dependency-injection\ContainerBuilder.php(1202): ReflectionClass->newInstanceArgs(Array)
#2 C:\laragon\www\bit-by-bit.org\public_html\vendor\symfony\dependency-injection\ContainerBuilder.php(637): Symfony\Component\DependencyInjection\ContainerBuilder->createService(Object(Symfony\Component\DependencyInjection\Definition), Array, true, 'field_defaults....')
#3 C:\laragon\www\bit-by-bit.org\public_html\vendor\symfony\dependency-injection\ContainerBuilder.php(582): Symfony\Component\DependencyInjection\ContainerBuilder->doGet('field_defaults....', 1)
#4 C:\laragon\www\bit-by-bit.org\public_html\vendor\drush\drush\src\Runtime\LegacyServiceInstantiator.php(289): Symfony\Component\DependencyInjection\ContainerBuilder->get('field_defaults....')
#5 C:\laragon\www\bit-by-bit.org\public_html\vendor\drush\drush\src\Runtime\LegacyServiceInstantiator.php(253): Drush\Runtime\LegacyServiceInstantiator->resolveFromContainer(Object(Drupal\Core\DependencyInjection\ContainerBuilder), 'field_defaults....')
#6 [internal function]: Drush\Runtime\LegacyServiceInstantiator->resolveArgument('@field_defaults...')
#7 C:\laragon\www\bit-by-bit.org\public_html\vendor\drush\drush\src\Runtime\LegacyServiceInstantiator.php(223): array_map(Array, Array)
#8 C:\laragon\www\bit-by-bit.org\public_html\vendor\drush\drush\src\Runtime\LegacyServiceInstantiator.php(193): Drush\Runtime\LegacyServiceInstantiator->resolveArguments(Array) ...

Comments

sirclickalot created an issue. See original summary.

sirclickalot’s picture

amateescu’s picture

Status: Active » Closed (duplicate)

Posted a fix in the Field Defaults module, there's nothing that Trash can do about it :)

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.