TypeError: Argument 1 passed to Drupal\Core\Entity\Entity::create() must be of the type array, null given, called in [error]
/home/public_html_8/modules/domain/domain/domain.module on line 145 in Drupal\Core\Entity\Entity::create() (line 513 of
/home/public_html_8/core/lib/Drupal/Core/Entity/Entity.php) #0 /home/public_html_8/modules/domain/domain/domain.module(145):
Drupal\Core\Entity\Entity::create(NULL)
#1 /home/public_html_8/modules/domain/domain/domain.install(24): domain_confirm_fields('user', 'user')
#2 /root/.composer/vendor/drush/drush/commands/core/drupal/update.inc(58): domain_update_8001(Array)
#3 /root/.composer/vendor/drush/drush/commands/core/drupal/batch.inc(150): drush_update_do_one('domain', 8001, Array, Object(DrushBatchContext))
#4 /root/.composer/vendor/drush/drush/commands/core/drupal/batch.inc(102): _drush_batch_worker()
#5 /root/.composer/vendor/drush/drush/includes/batch.inc(90): _drush_batch_command('336')
#6 /root/.composer/vendor/drush/drush/commands/core/drupal/update.inc(170): drush_batch_command('336')
#7 /root/.composer/vendor/drush/drush/commands/core/core.drush.inc(1192): _update_batch_command('336')
#8 /root/.composer/vendor/drush/drush/includes/command.inc(364): drush_core_updatedb_batch_process('336', '336')
#9 /root/.composer/vendor/drush/drush/includes/command.inc(215): _drush_invoke_hooks(Array, Array)
#10 /root/.composer/vendor/drush/drush/includes/command.inc(183): drush_command('336', '336')
#11 /root/.composer/vendor/drush/drush/lib/Drush/Boot/BaseBoot.php(65): drush_dispatch(Array)
#12 /root/.composer/vendor/drush/drush/includes/preflight.inc(64): Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#13 /root/.composer/vendor/drush/drush/drush.php(12): drush_main()
#14 {main}.
TypeError: Argument 1 passed to Drupal\Core\Entity\Entity::create() must be of the type array, null given, called in /home/public_html_8/modules/domain/domain/domain.module on line 145 in Drupal\Core\Entity\Entity::create() (line 513 of /home/public_html_8/core/lib/Drupal/Core/Entity/Entity.php).
Drush command terminated abnormally due to an unrecoverable error.
Comments
Comment #2
lba_emanuel CreditAttribution: lba_emanuel commentedHi,
You need to add manually the Domain Admin field.
See https://www.drupal.org/project/domain/releases/8.x-1.0-alpha7
For site administrators
If you have previously installed the module, you will have to do a few things.
Comment #3
dremy CreditAttribution: dremy commentedI got this error as well. I followed the above instructions:
Fix domain_id numeric values.
But when running
drush updatedb
I still got the update error above.Comment #4
dremy CreditAttribution: dremy commentedAlso getting this:
Notice: Undefined index: field_domain_admin in Drupal\domain\DomainElementManager->setFormOptions() (line 44 of /modules/domain/domain/src/DomainElementManager.php).
Comment #5
dremy CreditAttribution: dremy commentedAlright I solved this by:
1. Fix domain_id numeric values
-- Enabling Domain Alpha
-- Run the database upgrade: This is not
drush updatedb
OR update.php. I needed to usedrush entup
to fix Mismatching Entity field definitions. Then I ran update script to perform 8001.Then performing from above:
2. Install the Domain Admin field
3. Check permissions
Comment #6
agentrickardThere is also a bug that was recently fixed, which you can find here -- https://github.com/agentrickard/domain/pull/306/files
@dremy I'm interested in the
drush entup
solution. I didn't run into that in testing.Comment #7
agentrickardAnd I just pushed 8.x-1.x-dev over from GitHub, so the original error should be fixed in the dev version today.
Comment #8
dremy CreditAttribution: dremy commentedThanks. Ya, drush entity update essentially cleans up rogue field definitions.
Comment #9
agentrickardThanks. I updated the release notes to point here as well.
https://www.drupal.org/project/domain/releases/8.x-1.0-alpha7
Comment #11
agentrickard