- Issue created by @super_romeo
- Merge request !63Issue#3530218: Function maxlength_field_widget_third_party_settings_form() should return array. → (Merged) created by divyansh.gupta
- 🇮🇳India divyansh.gupta Jaipur
Yes i agree that if there is nothing to show then also it should return an array, thus made the required changes.
Please review!! - 🇷🇸Serbia super_romeo Belgrade
Thank you, @divyansh.gupta!
Works as expected :) - 🇺🇸United States mlncn Minneapolis, MN, USA
The patch is straightforward and very needed.
Marking as major because it can cause a fatal error when you try to go to the manage display form of a content type (for example
/admin/structure/types/manage/article/form-display
). And there is no easy way to figure out that maxlength is to blame without a debugger (or searching the web now that i'm dumping the entire error message here):The website encountered an unexpected error. Try again later.
TypeError: Unsupported operand types: array + null in Drupal\field_ui\Form\EntityFormDisplayEditForm->{closure:Drupal\field_ui\Form\EntityFormDisplayEditForm::thirdPartySettingsForm():129}() (line 131 of core/modules/field_ui/src/Form/EntityFormDisplayEditForm.php).
And the stacktrace:
Drupal\Core\Extension\ModuleHandler->invokeAllWith() (Line: 127) Drupal\field_ui\Form\EntityFormDisplayEditForm->thirdPartySettingsForm() (Line: 459) Drupal\field_ui\Form\EntityDisplayFormBase->buildFieldRow() (Line: 40) Drupal\field_ui\Form\EntityFormDisplayEditForm->buildFieldRow() (Line: 213) Drupal\field_ui\Form\EntityDisplayFormBase->form() (Line: 107) Drupal\Core\Entity\EntityForm->buildForm() call_user_func_array() (Line: 528) Drupal\Core\Form\FormBuilder->retrieveForm() (Line: 279) Drupal\Core\Form\FormBuilder->buildForm() (Line: 73) Drupal\Core\Controller\FormController->getContentResult() call_user_func_array() (Line: 123) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->{closure:Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber::wrapControllerExecutionInRenderContext():121}() (Line: 622) Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 121) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->{closure:Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber::onController():96}() (Line: 183) Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76) Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 53) Drupal\Core\StackMiddleware\Session->handle() (Line: 48) Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 28) Drupal\Core\StackMiddleware\ContentLength->handle() (Line: 32) Drupal\big_pipe\StackMiddleware\ContentLength->handle() (Line: 116) Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 90) Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 48) Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51) Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 53) Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 51) Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 715) Drupal\Core\DrupalKernel->handle() (Line: 19)
- cd41119b committed on 3.x
Issue#3530218: Function maxlength_field_widget_third_party_settings_form...
- cd41119b committed on 3.x
-
joevagyok →
committed f156d79a on 2.1.x
Issue#3530218: Function maxlength_field_widget_third_party_settings_form...
-
joevagyok →
committed f156d79a on 2.1.x