Unexpected error while attempting to change display

Created on 15 July 2024, 5 months ago
Updated 6 August 2024, 5 months ago

Some Bibcite reference types show an "Unexpected error" WSOD while attempting to change their display. However, some reference types do show the display modes and their edit form, but the changes can't be saved.

The website uses Display Suite, but the error occurs no matter if DS was configured or not for the entity type. Looks like the latest Bibcite 3.0.0-beta4 version is the culprit, as everything worked fine with the previous one.

Trying different PHP versions (8.1 - 8.2 - 8.3) doesn't help.

Example path :
https://website.org/admin/structure/bibcite/reference/settings/types/mag...

Error : Call to a member function label() on null in _ds_field_ui_table_layouts() (line 903 of /var/www/vhosts/website.org/httpdocs/website.org/web/modules/contrib/ds/includes/field_ui.inc).

Log message :

#0 /var/www/vhosts/website.org/httpdocs/website.org/web/modules/contrib/ds/includes/field_ui.inc(51): _ds_field_ui_table_layouts()
#1 /var/www/vhosts/website.org/httpdocs/website.org/web/modules/contrib/ds/ds.module(247): ds_field_ui_fields_layouts()
#2 /var/www/vhosts/website.org/httpdocs/website.org/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(552): ds_form_entity_view_display_edit_form_alter()
#3 /var/www/vhosts/website.org/httpdocs/website.org/web/core/lib/Drupal/Core/Form/FormBuilder.php(834): Drupal\Core\Extension\ModuleHandler->alter()
#4 /var/www/vhosts/website.org/httpdocs/website.org/web/core/lib/Drupal/Core/Form/FormBuilder.php(285): Drupal\Core\Form\FormBuilder->prepareForm()
#5 /var/www/vhosts/website.org/httpdocs/website.org/web/core/lib/Drupal/Core/Controller/FormController.php(73): Drupal\Core\Form\FormBuilder->buildForm()
#6 [internal function]: Drupal\Core\Controller\FormController->getContentResult()
#7 /var/www/vhosts/website.org/httpdocs/website.org/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array()
#8 /var/www/vhosts/website.org/httpdocs/website.org/web/core/lib/Drupal/Core/Render/Renderer.php(638): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#9 /var/www/vhosts/website.org/httpdocs/website.org/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext()
#10 /var/www/vhosts/website.org/httpdocs/website.org/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext()
#11 /var/www/vhosts/website.org/httpdocs/website.org/vendor/symfony/http-kernel/HttpKernel.php(181): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#12 /var/www/vhosts/website.org/httpdocs/website.org/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
#13 /var/www/vhosts/website.org/httpdocs/website.org/web/core/lib/Drupal/Core/StackMiddleware/Session.php(53): Symfony\Component\HttpKernel\HttpKernel->handle()
#14 /var/www/vhosts/website.org/httpdocs/website.org/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
#15 /var/www/vhosts/website.org/httpdocs/website.org/web/core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
#16 /var/www/vhosts/website.org/httpdocs/website.org/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\ContentLength->handle()
#17 /var/www/vhosts/website.org/httpdocs/website.org/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass()
#18 /var/www/vhosts/website.org/httpdocs/website.org/web/core/modules/ban/src/BanMiddleware.php(50): Drupal\page_cache\StackMiddleware\PageCache->handle()
#19 /var/www/vhosts/website.org/httpdocs/website.org/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\ban\BanMiddleware->handle()
#20 /var/www/vhosts/website.org/httpdocs/website.org/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#21 /var/www/vhosts/website.org/httpdocs/website.org/web/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(36): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#22 /var/www/vhosts/website.org/httpdocs/website.org/web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\AjaxPageState->handle()
#23 /var/www/vhosts/website.org/httpdocs/website.org/web/core/lib/Drupal/Core/DrupalKernel.php(741): Drupal\Core\StackMiddleware\StackedHttpKernel->handle()
#24 /var/www/vhosts/website.org/httpdocs/website.org/web/index.php(19): Drupal\Core\DrupalKernel->handle()
#25 {main}

πŸ› Bug report
Status

Active

Version

3.0

Component

Code

Created by

πŸ‡¨πŸ‡¦Canada mediameriquat

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

Comments & Activities

  • Issue created by @mediameriquat
  • πŸ‡ΊπŸ‡ΈUnited States AndrewGearhart

    I'm running bibcite-3.0.0-beta4 and I'm unable to reproduce. I visited the page, clicked through each of the display types and saved each one without errors. Β―\_(ツ)_/Β―

  • πŸ‡¨πŸ‡¦Canada mediameriquat

    @AndrewGearhart The error occurs with Display Suite 8.x-3.22, that's the only additional information I can provide.

  • I have the same issue, running DS 8.x-3.19, Drupal 10.2.4, PHP 8.1.29.

    Error: Call to a member function label() on null in _ds_field_ui_table_layouts() (line 904 of /var/www/html/modules/contrib/ds/includes/field_ui.inc).

    #0 /var/www/html/modules/contrib/ds/includes/field_ui.inc(51): _ds_field_ui_table_layouts()
    #1 /var/www/html/modules/contrib/ds/ds.module(247): ds_field_ui_fields_layouts()
    #2 /var/www/html/core/lib/Drupal/Core/Extension/ModuleHandler.php(545): ds_form_entity_view_display_edit_form_alter()
    #3 /var/www/html/core/lib/Drupal/Core/Form/FormBuilder.php(841): Drupal\Core\Extension\ModuleHandler->alter()
    #4 /var/www/html/core/lib/Drupal/Core/Form/FormBuilder.php(284): Drupal\Core\Form\FormBuilder->prepareForm()
    #5 /var/www/html/core/lib/Drupal/Core/Controller/FormController.php(73): Drupal\Core\Form\FormBuilder->buildForm()
    #6 /var/www/html/core/modules/layout_builder/src/Controller/LayoutBuilderHtmlEntityFormController.php(39): Drupal\Core\Controller\FormController->getContentResult()
    #7 [internal function]: Drupal\layout_builder\Controller\LayoutBuilderHtmlEntityFormController->getContentResult()
    #8 /var/www/html/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array()
    #9 /var/www/html/core/lib/Drupal/Core/Render/Renderer.php(627): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
    #10 /var/www/html/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext()
    #11 /var/www/html/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext()
    #12 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(181): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
    #13 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
    #14 /var/www/html/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle()
    #15 /var/www/html/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
    #16 /var/www/html/core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
    #17 /var/www/html/core/modules/big_pipe/src/StackMiddleware/ContentLength.php(32): Drupal\Core\StackMiddleware\ContentLength->handle()
    #18 /var/www/html/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\big_pipe\StackMiddleware\ContentLength->handle()
    #19 /var/www/html/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass()
    #20 /var/www/html/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle()
    #21 /var/www/html/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
    #22 /var/www/html/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(36): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
    #23 /var/www/html/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\AjaxPageState->handle()
    #24 /var/www/html/core/lib/Drupal/Core/DrupalKernel.php(704): Drupal\Core\StackMiddleware\StackedHttpKernel->handle()
    #25 /var/www/html/index.php(19): Drupal\Core\DrupalKernel->handle()
    #26 {main}
Production build 0.71.5 2024