When open user edit page then I see following error:

Notice: Undefined index: weight in Drupal\Core\Entity\EntityDisplayBase->init() (line 167 of core/lib/Drupal/Core/Entity/EntityDisplayBase.php).

Drupal\Core\Entity\EntityDisplayBase->init() (Line: 143)
Drupal\Core\Entity\EntityDisplayBase->__construct(Array, 'entity_form_display') (Line: 129)
Drupal\Core\Entity\Entity\EntityFormDisplay->__construct(Array, 'entity_form_display') (Line: 322)
Drupal\Core\Entity\EntityStorageBase->mapFromStorageRecords(Array, Array) (Line: 189)
Drupal\Core\Config\Entity\ConfigEntityStorage->doLoadMultiple(Array) (Line: 242)
Drupal\Core\Entity\EntityStorageBase->loadMultiple(Array) (Line: 212)
Drupal\Core\Entity\EntityStorageBase->load('user.user.default') (Line: 95)
Drupal\Core\Entity\Entity\EntityFormDisplay::collectRenderDisplay(Object, 'default') (Line: 285)
Drupal\Core\Entity\ContentEntityForm->init(Object) (Line: 107)
Drupal\Core\Entity\EntityForm->buildForm(Array, Object)
call_user_func_array(Array, Array) (Line: 514)
Drupal\Core\Form\FormBuilder->retrieveForm('user_form', Object) (Line: 271)
Drupal\Core\Form\FormBuilder->buildForm('user_form', Object) (Line: 74)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 582)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 151)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 50)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 664)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Comments

chmez created an issue. See original summary.

ohorbatiuk’s picture

Assigned: ohorbatiuk » Unassigned
Status: Active » Needs review
StatusFileSize
new1.69 KB
akash.addweb’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new251.6 KB
new26.25 KB

@chmez, Thank you for the patch, It works well for me as it doesn't show the error in recent logs while going to edit user page. PFA for result.

  • Jaypan committed 3573065 on 8.x-1.x authored by chmez
    Issue #2972948 by chmez, Ronak.addweb: Entity field weights
    
jaypan’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for the patch and testing guys.

  • Jaypan committed 3573065 on 8.x-2.x authored by chmez
    Issue #2972948 by chmez, Ronak.addweb: Entity field weights
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.