Problem/Motivation

Fatal when editing a layout on an user-display.

Error: Call to undefined method Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplay::hasField() in Drupal\sites_content_overrides_layout_builder\SitesContentOverridesInlineBlockEntityOperations->saveInlineBlockComponent() (line 22 of modules/contrib/sites_content_overrides/modules/sites_content_overrides_layout_builder/src/SitesContentOverridesInlineBlockEntityOperations.php).

Drupal\layout_builder\InlineBlockEntityOperations->handlePreSave() (Line: 47)
sites_content_overrides_layout_builder_entity_presave()
call_user_func_array() (Line: 389)
Drupal\Core\Extension\ModuleHandler->Drupal\Core\Extension\{closure}() (Line: 340)
Drupal\Core\Extension\ModuleHandler->invokeAllWith() (Line: 388)
Drupal\Core\Extension\ModuleHandler->invokeAll() (Line: 336)
Drupal\Core\Config\Entity\ConfigEntityStorage->invokeHook() (Line: 568)
Drupal\Core\Entity\EntityStorageBase->doPreSave() (Line: 522)
Drupal\Core\Entity\EntityStorageBase->save() (Line: 239)
Drupal\Core\Config\Entity\ConfigEntityStorage->save() (Line: 370)
Drupal\Core\Entity\EntityBase->save() (Line: 635)
Drupal\Core\Config\Entity\ConfigEntityBase->save() (Line: 180)
Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplay->save() (Line: 312)
Drupal\layout_builder\Plugin\SectionStorage\DefaultsSectionStorage->save() (Line: 144)
Drupal\layout_builder\Form\DefaultsEntityForm->save() (Line: 120)
Drupal\sites\FormDecorator\SitesSelectionEntityFormDecorator->save() (Line: 108)
Drupal\Core\Form\FormSubmitter->executeSubmitHandlers() (Line: 45)
Drupal\Core\Form\FormSubmitter->doSubmitForm() (Line: 615)
Drupal\Core\Form\FormBuilder->processForm() (Line: 347)
Drupal\Core\Form\FormBuilder->buildForm() (Line: 73)
Drupal\Core\Controller\FormController->getContentResult()
call_user_func_array() (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 634)
Drupal\Core\Render\Renderer::Drupal\Core\Render\{closure}()
Fiber->resume() (Line: 649)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 121)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 183)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 53)
Drupal\Core\StackMiddleware\Session->handle() (Line: 53)
Drupal\sites\SitesTrustedHostsMiddleware->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle() (Line: 32)
Drupal\big_pipe\StackMiddleware\ContentLength->handle() (Line: 118)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 92)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 50)
Drupal\ban\BanMiddleware->handle() (Line: 53)
Asm89\Stack\Cors->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 53)
Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 54)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 745)
Drupal\Core\DrupalKernel->handle() (Line: 19)

Steps to reproduce

Make sure users have a display with layout builder
Go to user profile manage display layout builder
Change something
Save

Proposed resolution

Check in SitesContentOverridesInlineBlockEntityOperations.php for ContentEntityInterface.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

gashunk created an issue. See original summary.

gashunk’s picture

Status: Active » Needs review

harlor made their first commit to this issue’s fork.

  • harlor committed 4dbe2798 on 1.x authored by gashunk
    fix: #3588283 Fatal when editing layout for user.
    
    By: gashunk
    
harlor’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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