I have a similar problem of https://www.drupal.org/project/filecache/issues/3045245
Tested also the patch but it doesn't solve the issue
The difference is that compared to the above issue which happens by activating syslog, in my case it also occurs with the module not installed.
My error message:
Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException: Circular reference detected for service "cache.backend.file_system", path: "http_kernel -> http_middleware.negotiation -> http_middleware.reverse_proxy -> http_middleware.page_cache -> cache.page -> cache.backend.file_system -> file_system -> logger.channel.file -> logger.factory -> logger.syslog -> config.factory -> config.storage -> cache.config". in Drupal\Component\DependencyInjection\Container->get() (line 143 of /Users/Advscraper/Sites/devdesktop/drupal-8.8.5/core/lib/Drupal/Component/DependencyInjection/Container.php)
I must specify two things:
- Test setting for the filecache directory seems to work since it creates files in the correct directory
$settings['filecache']['directory']['default'] = '/users/advscraper/sites/devdesktop/filecache';
I report here the content of one of the two files under the 'filecache/config' subfolder since it contains reference to syslog (I'm not an expert, so I don't know if it's important):
O:8:"stdClass":6:{s:3:"cid";s:15:"syslog.settings";s:4:"data";a:4:{s:8:"identity";s:6:"drupal";s:8:"facility";i:128;s:6:"format";s:72:"!base_url|!timestamp|!type|!ip|!request_uri|!referer|!uid|!link|!message";s:5:"_core";a:1:{s:19:"default_config_hash";s:43:"vdXLRPZRg35PBykBRRXr6RTql5EJR_fUi2kxyZ8c5m0";}}s:6:"expire";i:-1;s:4:"tags";a:0:{}s:7:"created";d:1587368519.674;s:8:"checksum";i:0;}
- Test override to specific cache bins also work without errors:
$settings['cache']['bins']['entity'] = 'cache.backend.file_system';
$settings['cache']['bins']['page'] = 'cache.backend.file_system';
It remain the problem of '$settings['cache']['default'] = 'cache.backend.file_system'; which I hope it can be solved.
I hope that what I've reported can help and thanks to those who can help me
Comments
Comment #2
idflorin commentedSame error:
Drupal 8.8.5/PHP 7.4
Comment #3
senzaesclusiva commented[SOLVED] I solved this way:
After seeing that
did not give errors and the above cache files was created, I made sure that the main filecache folder directory, located (in my case) in the root of the 'devdesktop' application, was set to chmod 700
After this I have inserted as first instance the directory of filecache folder
$settings['filecache']['directory']['default'] = '/Users/Advscraper/Sites/devdesktop/filecache';Still no error.
Therefore i set
$settings['cache']['bins']['entity'] = 'cache.backend.file_system';No logs and system error now!
and magically my 'filecache' folder has been properly populated with cache directories !!
So, the final result in settings.php file is
and here you can see the image of the filecache folders structure
https://res.cloudinary.com/acid57ads/image/upload/v1589277516/filecache_...
Drupal 8.8.5 Php 7.2.18
Maybe flush/clear cache and server restart could help in some cases
Comment #4
idflorin commented#3 works if I change this
$settings['cache']['default'] = 'cache.backend.file_system';to
$settings['cache']['bins']['default'] = 'cache.backend.file_system';Comment #5
socialnicheguru commentedI do want to note that this is correct to set the default filecache bin:
$settings['cache']['default'] = 'cache.backend.file_system';However the workaround above did not work for me in php8.1 Drupal9.5.8.
I had to add this patch to my composer.json file:
"for filecache and syslog to work - Dependency on config storage causes circular reference in service container":"https://www.drupal.org/files/issues/2023-02-22/3103620-34.patch",
without it I get the following:
The website encountered an unexpected error. Please try again later.
Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException: Circular reference detected for service "cache.backend.file_system", path: "http_kernel -> http_middleware.negotiation -> http_middleware.reverse_proxy -> http_middleware.redirect_after_webform_submit -> http_middleware.page_cache -> cache.page -> cache.backend.file_system -> file_system -> logger.channel.file -> logger.factory -> logger.syslog -> config.factory -> config.storage -> cache.config". in Drupal\Component\DependencyInjection\Container->get() (line 147 of core/lib/Drupal/Component/DependencyInjection/Container.php).
I do have webform enabled. I did not try it without webform enabled.
Comment #6
socialnicheguru commentedComment #7
kensae commentedThis configuration works for me:
Comment #8
senzaesclusiva commentedSorry @Kensae
given the time elapsed, on which Drupal version did you set up this configuration?
Comment #9
kensae commentedI'm using Drupal 10.1.4
Comment #10
senzaesclusiva commentedMany thanks
Comment #11
geek-merlinIt is that core issue, postponing on it.
Comment #12
mfbI read thru this issue but I don't understand it. A circular reference re: syslog module when syslog module is not installed? Can someone provide steps to reproduce?