Warnings when trying to add a video field to a content type

Created on 25 October 2024, 5 months ago

Problem/Motivation

I installed this module, enabled and ran the update script. Then I went to one of my content types and tried to add a Video field and 3 warnings appeared on the field's settings page:

  1. Warning: Undefined array key "#element_validate" in filefield_paths_filefield_paths_field_settings() (line 26 of modules/contrib/filefield_paths/filefield_paths.inc).
    filefield_paths_filefield_paths_field_settings()
    call_user_func_array() (Line: 409)
    Drupal\Core\Extension\ModuleHandler->Drupal\Core\Extension\{closure}() (Line: 388)
    Drupal\Core\Extension\ModuleHandler->invokeAllWith() (Line: 408)
    Drupal\Core\Extension\ModuleHandler->invokeAll() (Line: 87)
    filefield_paths_form_field_config_edit_form_alter() (Line: 545)
    Drupal\Core\Extension\ModuleHandler->alter() (Line: 841)
    Drupal\Core\Form\FormBuilder->prepareForm() (Line: 284)
    Drupal\Core\Form\FormBuilder->buildForm() (Line: 48)
    Drupal\Core\Entity\EntityFormBuilder->getForm() (Line: 62)
    Drupal\field_ui\Controller\FieldConfigAddController->fieldConfigAddConfigureForm()
    call_user_func_array() (Line: 123)
    Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 627)
    Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 121)
    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: 32)
    Drupal\big_pipe\StackMiddleware\ContentLength->handle() (Line: 106)
    Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 85)
    Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 50)
    Drupal\ban\BanMiddleware->handle() (Line: 48)
    Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
    Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 36)
    Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 49)
    Drupal\remove_http_headers\StackMiddleware\RemoveHttpHeadersMiddleware->handle() (Line: 51)
    Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 704)
    Drupal\Core\DrupalKernel->handle() (Line: 19)
  2. Warning: Undefined array key "#default_value" in filefield_paths_filefield_paths_field_settings() (line 27 of modules/contrib/filefield_paths/filefield_paths.inc).
    filefield_paths_filefield_paths_field_settings()
    call_user_func_array() (Line: 409)
    Drupal\Core\Extension\ModuleHandler->Drupal\Core\Extension\{closure}() (Line: 388)
    Drupal\Core\Extension\ModuleHandler->invokeAllWith() (Line: 408)
    Drupal\Core\Extension\ModuleHandler->invokeAll() (Line: 87)
    filefield_paths_form_field_config_edit_form_alter() (Line: 545)
    Drupal\Core\Extension\ModuleHandler->alter() (Line: 841)
    Drupal\Core\Form\FormBuilder->prepareForm() (Line: 284)
    Drupal\Core\Form\FormBuilder->buildForm() (Line: 48)
    Drupal\Core\Entity\EntityFormBuilder->getForm() (Line: 62)
    Drupal\field_ui\Controller\FieldConfigAddController->fieldConfigAddConfigureForm()
    call_user_func_array() (Line: 123)
    Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 627)
    Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 121)
    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: 32)
    Drupal\big_pipe\StackMiddleware\ContentLength->handle() (Line: 106)
    Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 85)
    Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 50)
    Drupal\ban\BanMiddleware->handle() (Line: 48)
    Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
    Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 36)
    Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 49)
    Drupal\remove_http_headers\StackMiddleware\RemoveHttpHeadersMiddleware->handle() (Line: 51)
    Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 704)
    Drupal\Core\DrupalKernel->handle() (Line: 19)
  3. Warning: Undefined array key "#type" in Drupal\Core\Form\FormHelper::processStates() (line 211 of core/lib/Drupal/Core/Form/FormHelper.php).
    Drupal\Core\Form\FormHelper::processStates() (Line: 447)
    Drupal\Core\Render\Renderer->doRender() (Line: 493)
    Drupal\Core\Render\Renderer->doRender() (Line: 493)
    Drupal\Core\Render\Renderer->doRender() (Line: 240)
    Drupal\Core\Render\Renderer->render() (Line: 238)
    Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 627)
    Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 231)
    Drupal\Core\Render\MainContent\HtmlRenderer->prepare() (Line: 128)
    Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse() (Line: 90)
    Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray()
    call_user_func() (Line: 111)
    Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch() (Line: 186)
    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: 32)
    Drupal\big_pipe\StackMiddleware\ContentLength->handle() (Line: 106)
    Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 85)
    Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 50)
    Drupal\ban\BanMiddleware->handle() (Line: 48)
    Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
    Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 36)
    Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 49)
    Drupal\remove_http_headers\StackMiddleware\RemoveHttpHeadersMiddleware->handle() (Line: 51)
    Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 704)
    Drupal\Core\DrupalKernel->handle() (Line: 19)
🐛 Bug report
Status

Active

Version

3.0

Component

User interface

Created by

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

Comments & Activities

  • Issue created by @monaw
  • First commit to issue fork.
  • 🇮🇳India sayan_k_dutta

    Working on it

  • 🇮🇳India chandansha

    Hello @monaw,
    Could you please review once my steps. i followed below i did not get any kind of error.
    1.Take pull above branch.
    2. installed module.
    3. created video content type and add new video field.
    4. Change form settings and display settings.
    5. Created new content and add video.
    Thanks!!

  • Thank you for the fast response! I just did the following steps which recreated the warnings:

    1. Uninstall the Video Transcode module and then uninstall the Video module
    2. Clear all cache
    3. Reinstall the Video and Video Transcode modules and ran update script
    4. In my custom content type, i added a field and selected the Video option (see attached image named add_video_field.png)
    5. After I click on the "Continue" button, the above warnings are displayed (see second attached image named warnings.png)

    FYI, I am using D10.2.10 and have the File (Field) Paths module installed, in case that's helpful in debugging this issue...

  • 🇮🇳India sayan_k_dutta

    I was trying to reproduce the issue, there is no warning message if the File (Field) Paths module is not installed. But whenever this module is installed, warring appears when we try to add a video field. For Drupal 10, there is also no stable release for the File (Field) Paths module and it is in beta version for Drupal 10. An issue in this module may be causing Video module to behave like this. Looking more into it.

Production build 0.71.5 2024