File system settings page gives "'temporary' is not a supported key"

Created on 10 January 2025, 12 days ago

Problem/Motivation

In Drupal 11.1.1 saving the File system settings page (/admin/config/media/file-system) gives the form error message:

temporary' is not a supported key.

and the form is not saved.

I looked into the HTML markup and there's no form element with the name "temporary".
The only form element existing is the select: with name temporary_maximum_age.

I also looked into settings.php and there's also no such key.

Any ideas what may cause this?

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

🐛 Bug report
Status

Active

Version

11.0 🔥

Component

file system

Created by

🇩🇪Germany Anybody Porta Westfalica

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

Comments & Activities

  • Issue created by @Anybody
  • 🇩🇪Germany Anybody Porta Westfalica

    Same issue on all Drupal 11 projects, while Drupal 10 projects work fine. So I guess it's a Drupal 11 issue?

  • 🇩🇪Germany Anybody Porta Westfalica
  • I've not been able to reproduce this bug on Drupal 11. Are there any modules on the site that could modify the file module's configuration?

  • 🇩🇪Germany Anybody Porta Westfalica
  • 🇩🇪Germany Anybody Porta Westfalica

    @cilefen thanks for your quick reaction. That's really strange.

    We use a couple of contrib modules, but none that affects this form.
    Debugging this in ValidKeysConstraintValidator shows that the value that's being checked is:

    [
      temporary => string (6) "../tmp"
    ]

    This is the related settings.php entry, which looks fine to me:

    // Temp directory path:
    $settings["file_temp_path"] = "../tmp";

    In the settings UI the value looks like this:

    Temporary directory
    ../tmp
    A local file system path where temporary files will be stored. This directory should not be accessible over the web. This must be changed in settings.php.

    This is the backtrace:

    Drupal\Core\TypedData\Validation\RecursiveContextualValidator->validateConstraints() (Line: 154)
    Drupal\Core\TypedData\Validation\RecursiveContextualValidator->validateNode() (Line: 164)
    Drupal\Core\TypedData\Validation\RecursiveContextualValidator->validateNode() (Line: 106)
    Drupal\Core\TypedData\Validation\RecursiveContextualValidator->validate() (Line: 93)
    Drupal\Core\TypedData\Validation\RecursiveValidator->validate() (Line: 132)
    Drupal\Core\TypedData\TypedData->validate() (Line: 209)
    Drupal\Core\Form\ConfigFormBase->validateForm()
    call_user_func_array() (Line: 82)
    Drupal\Core\Form\FormValidator->executeValidateHandlers() (Line: 274)
    Drupal\Core\Form\FormValidator->doValidateForm() (Line: 118)
    Drupal\Core\Form\FormValidator->validateForm() (Line: 585)
    Drupal\Core\Form\FormBuilder->processForm() (Line: 321)
    Drupal\Core\Form\FormBuilder->buildForm() (Line: 73)
    Drupal\Core\Controller\FormController->getContentResult()
    call_user_func_array() (Line: 123)
    Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 593)
    Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 121)
    Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97)
    Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (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: 50)
    Drupal\ban\BanMiddleware->handle() (Line: 96)
    Drupal\crowdsec\Middleware->handle() (Line: 263)
    Drupal\shield\ShieldMiddleware->bypass() (Line: 162)
    Drupal\shield\ShieldMiddleware->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: 709)
    Drupal\Core\DrupalKernel->handle() (Line: 19)
    

    Honestly, I have no idea so far...

Production build 0.71.5 2024