Warning: file_put_contents(): Filename cannot be empty

484 Views Asked by At

After updating Drupal 8 to Drupal 9, the following error is displayed on the website page:

Warning: file_put_contents(): Filename cannot be empty in /var/www/html/web/modules/contrib/devel/src/DevelDumperManager.php on line 108

Although it is not in the logs. But there is a similar one:

Warning: file_put_contents(): Filename cannot be empty in Drupal\search_api_solr_devel\Logging\SolariumRequestLogger->preExecuteRequest() (line 148 of /var/www/html/web/modules/contrib/search_api_solr/modules/search_api_solr_devel/src/Logging/SolariumRequestLogger.php)

Perhaps these errors are somehow related. How I do fix these errors?

I tried debugging and this is what xdebug shows for the first error: enter image description here

1

There are 1 best solutions below

0
On

Looking at line 108 of devel/src/DevelDumperManager.php it seems to be wanting a file name that should be set in config.
This filename should have a default, but if you have upgraded it might not have been set correctly. Maybe just going to the devel settings page and saving the form would set this value.
Or maybe uninstall and reinstall the devel module.