After uninstalling then reinstalling module, I get this error when trying to administer user profiles (on /admin/config/people/profiles) :

Error: Call to a member function label() on null in Drupal\profile\Entity\Profile->label() (line 74 of modules/contrib/profile/src/Entity/Profile.php).

Drupal\profile\Entity\Profile->label() (Line: 267)
Drupal\Core\Entity\Entity->toLink() (Line: 106)
Drupal\profile\ProfileListBuilder->buildRow(Object) (Line: 229)
Drupal\Core\Entity\EntityListBuilder->render() (Line: 22)
Drupal\Core\Entity\Controller\EntityListController->listing('profile')
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 574)
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}()
call_user_func_array(Object, Array) (Line: 144)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 64)
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: 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: 50)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 656)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Comments

grubshka_v2 created an issue. See original summary.

maaty388’s picture

I can't reproduce this problem can you please provide steps when this error appears.

mglaman’s picture

Status: Active » Closed (won't fix)

This is due to Profile entities persisting and their bundles being removed.

    $label = $this->t('@type profile #@id', [
      '@type' => $profile_type->label(),
      '@id' => $this->id(),
    ]);

The bundle was deleted.