- Issue created by @cameron prince
- 🇮🇳India sarguna raj M
I too encountered a website down issue when clearing the cache on the website. After updating to 2.0.6
Error Log:
Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException: Circular reference detected for service "plugin.manager.mail", path: "webform.email_provider -> plugin.manager.mail -> logger.factory -> logger.watchdog_mailer". in Drupal\Component\DependencyInjection\Container->get() (line 147 of /code/web/core/lib/Drupal/Component/DependencyInjection/Container.php).Reverting to 2.0.3 resolved the error.
- 🇭🇺Hungary nevergone Nyíregyháza, Hungary, Europe
@sarguna-raj-m: Why Drupal core version?
- Status changed to Postponed: needs info
over 1 year ago 8:50am 25 May 2023 - 🇭🇺Hungary nevergone Nyíregyháza, Hungary, Europe
Please describe your website environment and configuration. I tested, but cannot reproduce (Drupal core 9.5.9 and Drush 11.5.1)
- 🇺🇸United States smillerLA
@nevergone I'm getting the same error as sarguna when clearing cache on Drupal 10.0.9.
- Status changed to Active
over 1 year ago 8:53pm 15 June 2023 - 🇭🇺Hungary nevergone Nyíregyháza, Hungary, Europe
@smillerLA
Ok, please describe step-by-step reproducing. Thanks.
- 🇺🇸United States kirksolar
@nevergone I'm getting the same error as the others in this thread. I believe it has something to do with the Webform module being enabled along with the Watchdog Mailer. I guess the repro steps would simply be to enable Webform and Watchdog Mailer and clear cache.
PHP: 8.1.17
Drupal: 10.0.9
Watchdog Mailer: 2.0.6
Webform: dev-6.2.x - 🇭🇺Hungary nevergone Nyíregyháza, Hungary, Europe
@kirksolar
Thanks, Which webform submodules are in use? - 🇺🇸United States cameron prince
I'm seeing this too. Backing down to 2.0.5 resolves it.
It looks like something to do with the injection of \Drupal\Core\Mail\MailManager.
- 🇨🇴Colombia sebasgd
I'm having the same issue in a website.
Drupal 10.1.0
Enabled modules: webform (6.2.0-beta6) and watchdog mailer (2.0.6). I have some webform submodules, but I also tried disabling all the others and keeping only webform and the issue was still happening.The steps to recreate this is to install both modules and then try to clear cache.
- 🇩🇪Germany Anybody Porta Westfalica
@LRWebks could you please install watchdog mailer and webform and test if this can be reproduced? See the comments above to track this down then.
- 🇺🇦Ukraine i-trokhanenko Lutsk 🇺🇦
I'm getting the same error.
Drupal core - 10.1.6
Webform - 6.2.0
Watchdog Mailer - 2.0.6Circular reference detected for service "Drupal\Core\Logger\LoggerChannelFa ctoryInterface", path: "asset.css.collection_optimizer -> file_system -> lo gger.channel.file -> Drupal\Core\Logger\LoggerChannelFactoryInterface -> lo gger.watchdog_mailer -> plugin.manager.mail".
- Assigned to lrwebks
- Issue was unassigned.
- Assigned to Anybody
- 🇩🇪Germany Anybody Porta Westfalica
I found two similar issues in other module:
- Assigned to nevergone
- 🇩🇪Germany Anybody Porta Westfalica
As of
Backing down to 2.0.5 resolves it.
there are the changes that potentially caused this:
https://git.drupalcode.org/project/watchdog_mailer/-/compare/2.0.5...2.0...So I'm quite sure
$mailManager
DI causes this!As a quickfix we could revert this to
\Drupal::service('plugin.manager.mail')
and add comments for the reason. But indeed I'd like to understand if we really need to do that and why.Might also be a bug outside this module. Perhaps someone would like to prepare a quickfix for now, as described above?
@nevergone any ideas?
- Open on Drupal.org →Core: 9.5.x + Environment: PHP 8.1 & MySQL 5.7last update
12 months ago Waiting for branch to pass - Status changed to Needs review
12 months ago 2:50pm 29 November 2023 - 🇩🇪Germany Anybody Porta Westfalica
Please have a look and try the quickfix I created. If it solves the issue, we should perhaps merge it and create a follow-up to find the deeper reasons?
- 🇭🇺Hungary nevergone Nyíregyháza, Hungary, Europe
@LRWebks Please write step-by-step reproduce descriptions. I have some ideas.
- 🇩🇪Germany Anybody Porta Westfalica
@nevergone the steps are simple, as written above:
- Install watchdog_mailer (>= 2.0.6)
- Install webform (base module is enough)
- Clear the cache
- BOOM ;)
<= 2.0.5 is fine (as written above, this DI was introduced in 2.0.6)
- 🇭🇺Hungary nevergone Nyíregyháza, Hungary, Europe
The thing is, I could never cause this error. I tried with several versions of Drupal, Webform and Watchdog mailer, but the error never occurred, even though I spent many hours dealing with it. I have some ideas to fix it correctly, but I think something else is triggering the error. That's why I need help to create it.
Here is PHP 8.2.8, Drupal 10.1.6, Webform 6.2.0, Watchdog mailer 2.0.6
I install it, turn on the modules, cache clear, the error does not appear, the page can be used. I will activate additional modules, the page can be used.
See attached video: https://www.drupal.org/files/issues/2023-11-30/Peek%202023-11-30%2008-49... → - 🇩🇪Germany Anybody Porta Westfalica
@nevergone okay strange, thank you for the feedback, I didn't know that!
I'll try some combinations at simplytest.me. Another idea might be, that this only happens when debug / developer tools are enabled. I remember a similar case from the past. @LRWebks and me use https://github.com/webksde/ddev-vscode-devcontainer-drupal-template to spin up our dev environments quickly with dev tools and settings enabled.
- 🇩🇪Germany Anybody Porta Westfalica
@nevergone: I was now able to reproduce the issue easily on simplytest.me!
Just like described (watchdog_mailer 2.0.6 and webform)
The important step was to clear caches, e.g./admin/config/development/performance
- 🇭🇺Hungary nevergone Nyíregyháza, Hungary, Europe
@Anybody:
In the video, I delete the cache several times using drush, but I also try it from the web interface. - Open on Drupal.org →Core: 9.5.x + Environment: PHP 8.1 & MySQL 5.7last update
12 months ago Waiting for branch to pass - Issue was unassigned.
- 🇩🇪Germany Anybody Porta Westfalica
Thanks @nevergone the lazy loading solution from the container looks good to me! I'll test and review it asap!
What about the others here? Any feedback? - Status changed to RTBC
12 months ago 8:50am 1 December 2023 - 🇩🇪Germany lrwebks Porta Westfalica
Just tested this with @Anybody! Works as expected, errors are still logged and the error is gone on cache clear.
RTBC!
-
nevergone →
committed cfbaa8fd on 2.0.x
Issue #3337719 by Anybody, nevergone, LRWebks: Circular reference...
-
nevergone →
committed cfbaa8fd on 2.0.x
- Status changed to Fixed
12 months ago 10:07am 1 December 2023 - 🇭🇺Hungary nevergone Nyíregyháza, Hungary, Europe
Thanks, coming soon 2.0.7 release! :)
- 🇩🇪Germany Anybody Porta Westfalica
Crazy. In my dev environment with stage_file_proxy module I now / still experience:
Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException: Circular reference detected for service "stage_file_proxy.proxy_subscriber", path: "stage_file_proxy.proxy_subscriber -> stage_file_proxy.download_manager -> file_system -> logger.channel.file -> logger.factory -> logger.watchdog_mailer". in Drupal\Component\DependencyInjection\Container->get() (line 147 of core/lib/Drupal/Component/DependencyInjection/Container.php).
Not sure if this is still something this module should fix and where it comes from... So just FYI for now.
- 🇭🇺Hungary nevergone Nyíregyháza, Hungary, Europe
@Anybody:
Which watchdog_mailer version? - 🇩🇪Germany Anybody Porta Westfalica
Latest 2.0.x-dev, but don't invest time yet, might be something different. At least only have a short try, if you want to check it. Issue might be on my side!
- 🇩🇪Germany Anybody Porta Westfalica
I guess there was something wrong on my side. Let's not invest more time here until someone else reports issues with version >= 2.0.7 or dev.
Automatically closed - issue fixed for 2 weeks with no activity.