Hi!
I spun up a site with this module and the devel module. I enable them both plus devel_generate.
I added an entity reference field to the Article content type called "Related Pages" referencing the "Basic Page" content type.
I created a view that I could place on the "Basic Page"content type that would list the related articles.
I created a new field on the "Basic Page" content type of the field type "Block (plugin)". The view I created was not one of the available blocks. I selected it and clicked save. This is when I got the error. I have since then figured out that any change to the available blocks (ticking or unticking the boxes next to the blocks) causes this error. In the browser the error is:
The website encountered an unexpected error. Please try again later.
In the system log the error message is much more verbose and follows.
Thanks for investigating this error as it makes the module unusable if I cannot change the available blocks!
Frederick
Location https://dgz75.ply.st/admin/structure/types/manage/page/fields/node.page....
Referrer https://dgz75.ply.st/admin/structure/types/manage/page/fields/node.page....
Message Recoverable fatal error: Argument 1 passed to Drupal\Core\Form\SubformState::createForSubform() must be of the type array, null given, called in /home/dgz75/www/sites/default/modules/block_field/src/Plugin/Field/FieldWidget/BlockFieldWidget.php on line 208 and defined in Drupal\Core\Form\SubformState::createForSubform() (line 56 of /home/dgz75/www/core/lib/Drupal/Core/Form/SubformState.php) #0 /home/dgz75/www/core/includes/bootstrap.inc(548): _drupal_error_handler_real(4096, 'Argument 1 pass...', '/home/dgz75/www...', 56, Array) #1 /home/dgz75/www/core/lib/Drupal/Core/Form/SubformState.php(56): _drupal_error_handler(4096, 'Argument 1 pass...', '/home/dgz75/www...', 56, Array) #2 /home/dgz75/www/sites/default/modules/block_field/src/Plugin/Field/FieldWidget/BlockFieldWidget.php(208): Drupal\Core\Form\SubformState::createForSubform(NULL, Array, Object(Drupal\Core\Form\FormState)) #3 /home/dgz75/www/core/lib/Drupal/Core/Field/WidgetBase.php(370): Drupal\block_field\Plugin\Field\FieldWidget\BlockFieldWidget->massageFormValues(Array, Array, Object(Drupal\Core\Form\FormState)) #4 /home/dgz75/www/core/lib/Drupal/Core/Field/FieldItemList.php(314): Drupal\Core\Field\WidgetBase->extractFormValues(Object(Drupal\Core\Field\FieldItemList), Array, Object(Drupal\Core\Form\FormState)) #5 /home/dgz75/www/core/modules/field_ui/src/Form/FieldConfigEditForm.php(153): Drupal\Core\Field\FieldItemList->defaultValuesFormValidate(Array, Array, Object(Drupal\Core\Form\FormState)) #6 [internal function]: Drupal\field_ui\Form\FieldConfigEditForm->validateForm(Array, Object(Drupal\Core\Form\FormState)) #7 /home/dgz75/www/core/lib/Drupal/Core/Form/FormValidator.php(83): call_user_func_array(Array, Array) #8 /home/dgz75/www/core/lib/Drupal/Core/Form/FormValidator.php(270): Drupal\Core\Form\FormValidator->executeValidateHandlers(Array, Object(Drupal\Core\Form\FormState)) #9 /home/dgz75/www/core/lib/Drupal/Core/Form/FormValidator.php(119): Drupal\Core\Form\FormValidator->doValidateForm(Array, Object(Drupal\Core\Form\FormState), 'field_config_ed...') #10 /home/dgz75/www/core/lib/Drupal/Core/Form/FormBuilder.php(571): Drupal\Core\Form\FormValidator->validateForm('field_config_ed...', Array, Object(Drupal\Core\Form\FormState)) #11 /home/dgz75/www/core/lib/Drupal/Core/Form/FormBuilder.php(314): Drupal\Core\Form\FormBuilder->processForm('field_config_ed...', Array, Object(Drupal\Core\Form\FormState)) #12 /home/dgz75/www/core/lib/Drupal/Core/Controller/FormController.php(74): Drupal\Core\Form\FormBuilder->buildForm(Object(Drupal\field_ui\Form\FieldConfigEditForm), Object(Drupal\Core\Form\FormState)) #13 [internal function]: Drupal\Core\Controller\FormController->getContentResult(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\RouteMatch)) #14 /home/dgz75/www/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array) #15 /home/dgz75/www/core/lib/Drupal/Core/Render/Renderer.php(574): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() #16 /home/dgz75/www/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure)) #17 /home/dgz75/www/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) #18 [internal function]: Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() #19 /home/dgz75/www/vendor/symfony/http-kernel/HttpKernel.php(144): call_user_func_array(Object(Closure), Array) #20 /home/dgz75/www/vendor/symfony/http-kernel/HttpKernel.php(64): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1) #21 /home/dgz75/www/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #22 /home/dgz75/www/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #23 /home/dgz75/www/core/modules/page_cache/src/StackMiddleware/PageCache.php(99): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #24 /home/dgz75/www/core/modules/page_cache/src/StackMiddleware/PageCache.php(78): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true) #25 /home/dgz75/www/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #26 /home/dgz75/www/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(50): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #27 /home/dgz75/www/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #28 /home/dgz75/www/core/lib/Drupal/Core/DrupalKernel.php(652): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #29 /home/dgz75/www/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request)) #30 {main}.
Severity Error
Hostname 138.201.254.28