Error when using view modes

Created on 28 October 2024, 5 months ago

Problem/Motivation

Steps to reproduce

Log in to any
Assuming we are using the node-type "author_profile" then:

  • /admin/structure/types/manage/author_profile/ce-display
  • Scroll to the bottom at `Custom display settings`
  • Select 2 modes: e.g. Teaser Card & Teaser Large.
  • Click save.
  • Click on the tab "Teaser Card"
  • I am now on /admin/structure/types/manage/author_profile/ce-display/teaser_card
  • There is a warning / error at the top of the page:
    Drupal\custom_elements\Plugin\CustomElementsFieldFormatter\EntityReferenceCeFieldFormatter->settingsSummary() (Line: 861)
    Drupal\custom_elements_ui\Form\EntityCustomElementsDisplayEditForm->buildFieldRowPluginForm() (Line: 766)
    Drupal\custom_elements_ui\Form\EntityCustomElementsDisplayEditForm->buildFieldRow() (Line: 320)
    Drupal\custom_elements_ui\Form\EntityCustomElementsDisplayEditForm->form() (Line: 107)
    Drupal\Core\Entity\EntityForm->buildForm()
    call_user_func_array() (Line: 536)
    Drupal\Core\Form\FormBuilder->retrieveForm() (Line: 283)
    Drupal\Core\Form\FormBuilder->buildForm() (Line: 97)
    Drupal\autosave_form\Form\AutosaveFormBuilder->buildForm() (Line: 73)
    Drupal\Core\Controller\FormController->getContentResult() (Line: 39)
    Drupal\layout_builder\Controller\LayoutBuilderHtmlEntityFormController->getContentResult()
    call_user_func_array() (Line: 123)
    Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 627)
    Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 124)
    Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97)
    Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 181)
    Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76)
    Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 58)
    Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
    Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 28)
    Drupal\Core\StackMiddleware\ContentLength->handle() (Line: 107)
    Drupal\lupus_decoupled_ce_api\BackendApiRequest->handle() (Line: 106)
    Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 85)
    Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 85)
    Drupal\ldp_cdn\FixedBaseUrlMiddleware->handle() (Line: 53)
    Asm89\Stack\Cors->handle() (Line: 48)
    Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
    Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 36)
    Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 51)
    Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 704)
    Drupal\Core\DrupalKernel->handle() (Line: 19)

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

3.0

Component

Code

Created by

🇦🇹Austria jjchinquist Vienna, Austria

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @jjchinquist
  • 🇦🇹Austria jjchinquist Vienna, Austria
  • 🇮🇳India abhishek_virasat

    I have fixed the issue and created Patch. please review it once

    • roderik committed 54651b4d on 3.x
      Issue #3484098 by jjchinquist, roderik: fix undefined array key.
      
  • 🇳🇱Netherlands roderik Amsterdam,NL / Budapest,HU

    Fixed by direct push to 3.x branch; see commit.

    @abhishek_gupta1 please remove the notifications you have (apparently) set up for the custom_elements module; I will from now on feel free to silently ignore any contributions I get through Virasat Solutions, and not credit you, if things cost us extra time. Reason:

    • Review of your patch:
      • It does absolutely nothing. There is no functional change; you have just replaced a new PHP construct by an old one
      • It introduces unnecessary space changes in an otherwise unchanged line
      • Do not add comments to say exactly what the next (simple) line does. It's not helpful / adds no informatiib. Comments may be useful to say why code is doing something; otherwise, generally, just don't add them.
    • In 📌 Drupal 11 compatibility fixes for custom_elements 3.x Active ,
    • sarwan_varma just created extra work for us (by making things incompatible with Drupal 10.2). If we did things ourselves and ignored the contribution, we would be faster.
    • I credited him anyway. But this has crossed a line: I am not going to do this anymore, or feel obliged to give any reply that costs me time for no clear benefit.
  • 🇳🇱Netherlands roderik Amsterdam,NL / Budapest,HU
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024