When signing up as a new user and I have this module enabled I get this error. The user still gets created.


Notice: Undefined index: roles in Drupal\content_sync\Plugin\SyncNormalizerDecorator\IdsCleaner->cleanReferenceIds() (line 47 of /vagrant/web/modules/contrib/content_sync/src/Plugin/SyncNormalizerDecorator/IdsCleaner.php). =>

array:51 [▼
  "50: Drupal\content_sync\Plugin\SyncNormalizerDecorator\IdsCleaner->cleanReferenceIds()" => array:2 [▶]
  "49: Drupal\content_sync\Plugin\SyncNormalizerDecorator\IdsCleaner->decorateNormalization()" => array:2 [▶]
  "48: Drupal\content_sync\Normalizer\ContentEntityNormalizer->decorateNormalization()" => array:2 [▶]
  "47: Drupal\content_sync\Normalizer\ContentEntityNormalizer->normalize()" => array:2 [▶]
  "46: Drupal\content_sync\Normalizer\UserEntityNormalizer->normalize()" => array:2 [▶]
  "45: Symfony\Component\Serializer\Serializer->normalize()" => array:2 [▶]
  "44: Symfony\Component\Serializer\Serializer->serialize()" => array:2 [▶]
  "43: Drupal\content_sync\Exporter\ContentExporter->exportEntity()" => array:2 [▶]
  "42: content_sync_entity_update()" => array:2 [▶]
  "41: call_user_func_array()" => array:1 [▶]
  "40: Drupal\Core\Extension\ModuleHandler->invokeAll()" => array:2 [▶]
  "39: Drupal\Core\Entity\EntityStorageBase->invokeHook()" => array:2 [▶]
  "38: Drupal\Core\Entity\ContentEntityStorageBase->invokeHook()" => array:2 [▶]
  "37: Drupal\Core\Entity\EntityStorageBase->doPostSave()" => array:2 [▶]
  "36: Drupal\Core\Entity\ContentEntityStorageBase->doPostSave()" => array:2 [▶]
  "35: Drupal\Core\Entity\EntityStorageBase->save()" => array:2 [▶]
  "34: Drupal\Core\Entity\Sql\SqlContentEntityStorage->save()" => array:2 [▶]
  "33: Drupal\Core\Entity\Entity->save()" => array:1 [▶]
  "32: email_registration_user_insert()" => array:2 [▶]
  "31: call_user_func_array()" => array:1 [▶]
  "30: Drupal\Core\Extension\ModuleHandler->invokeAll()" => array:2 [▶]
  "29: Drupal\Core\Entity\EntityStorageBase->invokeHook()" => array:2 [▶]
  "28: Drupal\Core\Entity\ContentEntityStorageBase->invokeHook()" => array:2 [▶]
  "27: Drupal\Core\Entity\EntityStorageBase->doPostSave()" => array:2 [▶]
  "26: Drupal\Core\Entity\ContentEntityStorageBase->doPostSave()" => array:2 [▶]
  "25: Drupal\Core\Entity\EntityStorageBase->save()" => array:2 [▶]
  "24: Drupal\Core\Entity\Sql\SqlContentEntityStorage->save()" => array:2 [▶]
  "23: Drupal\Core\Entity\Entity->save()" => array:1 [▶]
  "22: Drupal\user\RegisterForm->save()" => array:2 [▶]
  "21: call_user_func_array()" => array:1 [▶]
  "20: Drupal\Core\Form\FormSubmitter->executeSubmitHandlers()" => array:2 [▶]
  "19: Drupal\Core\Form\FormSubmitter->doSubmitForm()" => array:2 [▶]
  "18: Drupal\Core\Form\FormBuilder->processForm()" => array:2 [▶]
  "17: Drupal\Core\Form\FormBuilder->buildForm()" => array:2 [▶]
  "16: Drupal\Core\Controller\FormController->getContentResult()" => array:2 [▶]
  "15: call_user_func_array()" => array:1 [▶]
  "14: Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()" => array:1 [▶]
  "13: Drupal\Core\Render\Renderer->executeInRenderContext()" => array:2 [▶]
  "12: Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext()" => array:2 [▶]
  "11: Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()" => array:1 [▶]
  "10: Symfony\Component\HttpKernel\HttpKernel->handleRaw()" => array:2 [▶]
  " 9: Symfony\Component\HttpKernel\HttpKernel->handle()" => array:2 [▶]
  " 8: Drupal\Core\StackMiddleware\Session->handle()" => array:2 [▶]
  " 7: Drupal\Core\StackMiddleware\KernelPreHandle->handle()" => array:2 [▶]
  " 6: Drupal\page_cache\StackMiddleware\PageCache->pass()" => array:2 [▶]
  " 5: Drupal\page_cache\StackMiddleware\PageCache->handle()" => array:2 [▶]
  " 4: Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()" => array:2 [▶]
  " 3: Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()" => array:2 [▶]
  " 2: Stack\StackedHttpKernel->handle()" => array:2 [▶]
  " 1: Drupal\Core\DrupalKernel->handle()" => array:2 [▶]
  " 0: main()" => array:2 [▶]
]

The website encountered an unexpected error. Please try again later.
RuntimeException: Failed to start the session because headers have already been sent by "/vagrant/web/modules/contrib/devel/devel.module" at line 268. in Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage->start() (line 141 of /vagrant/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php).

Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage->start() (Line: 164)
Drupal\Core\Session\SessionManager->startNow() (Line: 195)
Drupal\Core\Session\SessionManager->save() (Line: 193)
Symfony\Component\HttpFoundation\Session\Session->save() (Line: 60)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 99)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 78)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 666)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)


CommentFileSizeAuthor
#2 undefined_index_roles-2981119-1.patch1.05 KBjapo32

Comments

japo32 created an issue. See original summary.

japo32’s picture

StatusFileSize
new1.05 KB

I've added a small sanity check in the line.

kfritsche’s picture

Status: Active » Reviewed & tested by the community

Tested and works. Thanks for the patch.

blanca.esqueda’s picture

Status: Reviewed & tested by the community » Fixed

Thank you for the fix!
The patch has been committed to 8.x-2.x-dev

  • Blanca.Esqueda committed 694b8e6 on 8.x-2.x authored by japo32
    Issue #2981119 by japo32, kfritsche, Blanca.Esqueda: Undefined index:...
blanca.esqueda’s picture

Status: Fixed » Closed (fixed)