Module seems incompatible with Drupal 10.2

Created on 28 March 2024, about 1 year ago
Updated 30 April 2024, about 1 year ago

Problem/Motivation

Adding a list field to a node with D10.2 will result in validation errors and later on the field storage can't be saved.

Steps to reproduce

1. Install list_predefined_options
2. Add a new selection list field to a node type
3. Use List(text) as the type
4. In the field settings form try to select one of the predefined plugins, e.g.Timezones
5. Notice, that the form does not change, in previous versions the allowed values were hidden
6. As the allowed values are still part of the form and contain a required attribute, fill out one of them
7. Hit Save Settings

You'll get 2 errors:

The javascript console contains:

[Error] AjaxError: 
An AJAX HTTP error occurred.
HTTP Result Code: 500
Debugging information follows.
Path: /admin/structure/types/manage/article/add-field/node/field_test?destinations%5B0%5D%5Broute_name%5D=entity.node.field_ui_fields&destinations%5B0%5D%5Broute_parameters%5D%5Bentity_type%5D=node&destinations%5B0%5D%5Broute_parameters%5D%5Bfield_name%5D=field_test&destinations%5B0%5D%5Broute_parameters%5D%5Bnode_type%5D=article&destinations%5B1%5D=/admin/structure/types/manage/article/fields/add-field
StatusText: error
ResponseText: The website encountered an unexpected error. Try again later.Error: Call to undefined method Drupal\Core\Field\BaseFieldDefinition::getThirdPartySetting() in list_predefined_options_allowed_values() (line 110 of modules/contrib/list_predefined_options/list_predefined_options.module). options_allowed_values(Object, Object) (Line: 65)
Drupal\options\Plugin\Field\FieldType\ListItemBase->getSettableOptions(Object) (Line: 143)
Drupal\Core\Field\Plugin\Field\FieldWidget\OptionsWidgetBase->getOptions(Object) (Line: 34)
Drupal\Core\Field\Plugin\Field\FieldWidget\OptionsSelectWidget->formElement(Object, 0, Array, Array, Object) (Line: 459)
Drupal\Core\Field\WidgetBase->formSingleElement(Object, 0, Array, Array, Object) (Line: 101)
Drupal\Core\Field\WidgetBase->form(Object, Array, Object) (Line: 287)
Drupal\Core\Field\FieldItemList->defaultValuesForm(Array, Object) (Line: 230)
Drupal\field_ui\Form\FieldConfigEditForm->form(Array, Object) (Line: 107)
Drupal\Core\Entity\EntityForm->buildForm(Array, Object)
call_user_func_array(Array, Array) (Line: 536)
Drupal\Core\Form\FormBuilder->retrieveForm('field_config_edit_form', Object) (Line: 375)
Drupal\Core\Form\FormBuilder->rebuildForm('field_config_edit_form', Object, Array) (Line: 633)
Drupal\Core\Form\FormBuilder->processForm('field_config_edit_form', Array, Object) (Line: 325)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 48)
Drupal\Core\Entity\EntityFormBuilder->getForm(Object, 'default', Array) (Line: 63)
Drupal\field_ui\Controller\FieldConfigAddController->fieldConfigAddConfigureForm('node', 'field_test')
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 627)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 181)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle(Object, 1, 1) (Line: 32)
Drupal\big_pipe\StackMiddleware\ContentLength->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 704)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

	(anonymous function) (js_Wu9DoxPFb1979Ym3fM0LQ8rgU-BI-_NvI9DRwB9WqXU.js:250:13550)
	complete (js_Wu9DoxPFb1979Ym3fM0LQ8rgU-BI-_NvI9DRwB9WqXU.js:250:6041)
	(anonymous function) (js_Wu9DoxPFb1979Ym3fM0LQ8rgU-BI-_NvI9DRwB9WqXU.js:289:3569)
	c (js_Wu9DoxPFb1979Ym3fM0LQ8rgU-BI-_NvI9DRwB9WqXU.js:3:25310)
	fireWith (js_Wu9DoxPFb1979Ym3fM0LQ8rgU-BI-_NvI9DRwB9WqXU.js:3:26055)
	l (js_Wu9DoxPFb1979Ym3fM0LQ8rgU-BI-_NvI9DRwB9WqXU.js:3:77919)
	(anonymous function) (js_Wu9DoxPFb1979Ym3fM0LQ8rgU-BI-_NvI9DRwB9WqXU.js:3:80267)

Proposed resolution

Not sure how to tackle that.

🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇩🇪Germany stmh

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024