- 🇮🇳India mohit_aghera Rajkot
I tried to reproduce the issue while doing triage for Bug smash initiative.
Thanks to @rcodina and @dieterholvoet for providing hints about the project.
It seems to be happening whenfile_temp_path
setting isn't correct one.Since this issue happens due to missing
$settings['file_temp_path']
setting,
I added following config in the settings.php file.
$settings['file_temp_path'] = '/abc';
This directory doesn't exist at all inside my docker container and system is not able to create it either.After doing cache clear, I was able to see the theme properly.
I noticed following message on the screen which were able to convey that file_temp_path is incorrect.Notice: tempnam(): file created in the system's temporary directory in Drupal\Core\File\FileSystem->tempnam() (line 274 of core/lib/Drupal/Core/File/FileSystem.php). Warning: file_put_contents(temporary://filebNGCln): Failed to open stream: "Drupal\Core\StreamWrapper\TemporaryStream::stream_open" call failed in Drupal\Core\File\FileSystem->saveData() (line 498 of core/lib/Drupal/Core/File/FileSystem.php).
When we don't have the settings
$settings['file_temp_path'] = '/abc';
in settings.php, it falls back to `/tmp` directory of the OS.
In the following snippet, we can see that if settings is empty, Drupal will pick the operating system's tmp directory.
https://git.drupalcode.org/project/drupal/-/blob/11.x/core/lib/Drupal/Co...I think we would need more detailed steps to reproduce the issue.