#2563639: Global configuration via config entities introduced a global config system. However, when you actually try to access it at admin/structure/metatag_defaults, you get this fatal error:

The website encountered an unexpected error. Please try again later.
Recoverable fatal error: Argument 1 passed to Drupal\metatag\MetatagDefaultsListBuilder::buildRow() must implement interface Drupal\Core\Entity\EntityInterface, null given, called in core/lib/Drupal/Core/Entity/EntityListBuilder.php on line 234 and defined in Drupal\metatag\MetatagDefaultsListBuilder->buildRow() (line 39 of modules/contrib/metatag/src/MetatagDefaultsListBuilder.php).

Drupal\metatag\MetatagDefaultsListBuilder->buildRow(NULL)
Drupal\Core\Entity\EntityListBuilder->render()
Drupal\metatag\MetatagDefaultsListBuilder->render()
Drupal\Core\Entity\Controller\EntityListController->listing('metatag_defaults')
call_user_func_array(Array, Array)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
call_user_func_array(Object, Array)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1)
Stack\StackedHttpKernel->handle(Object, 1, 1)
Drupal\Core\DrupalKernel->handle(Object)

Comments

Dane Powell created an issue. See original summary.

juampynr’s picture

Status: Active » Postponed (maintainer needs more info)

Did you run database updates? There is a databse update that installs the default meta tags.

Dane Powell’s picture

Status: Postponed (maintainer needs more info) » Active

Yes, I run updb and also cleared caches.

It looks like this page was moved to admin/config/search/metatag as part of #2642430: Place admin interface under Search and Metadata but the problem persists.

juampynr’s picture

It looks like the MetatagDefault entities were not created in your database (as if the latest metatag database update did not run). If you are curious at what it does, have a look at metatag.install.

Can you install config_inspector module and see if there are MetatagDefaults entities such as global, page404, node, and such? If there aren't, you may need to run the database update again.

Dane Powell’s picture

Status: Active » Closed (cannot reproduce)

Of course when I go to seriously investigate this, it mysteriously starts working. *shrug*

Thanks for the help.

DamienMcKenna’s picture

@Dane: The code just started behaving when it saw juampynr checking in on it ;-)

tamnv’s picture

@Dane Powell,

I have same issue with you, when I run update.php, I have no pending update. I'm using beta9 version. What steps did you do to fix this issue.

stpaultim’s picture

I was having this problem today. I uninstalled the metatag module and submodules and then reinstalled them. This seems to have solved the problem.

Maffoo’s picture

8-1.3 release fixed this for me