2

Here's the error I'm seeing:

The website encountered an unexpected error. Please try again later.

Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: The "civi_flexmailer_required_tokens" service or alias has been removed or inlined when the container was compiled. You should either make it public, or stop using the container directly and use dependency injection instead. in Symfony\Component\DependencyInjection\Container->make() (line 275 of /home/sites/dev/vendor/symfony/dependency-injection/Container.php).

Any pointers most welcome.

6
  • Did you see any errors in Composer when you were downloading? Was this an upgrade or a new install?
    – Steve
    Commented Jun 28, 2021 at 3:14
  • Not that I'm aware of. It's a relatively new site that I'm working on. I've not come across the error before, so I'm assuming that it has arisen following an update.
    – Graham
    Commented Jun 29, 2021 at 8:50
  • I am getting this as well. It's a brand new D9 site and I've placed a database into it from an old D7 site. I can't run Mosaico, or access the System Status page. Commented Aug 19, 2021 at 8:47
  • 2
    is this anything to do with flexmailer now being a core extension but you still having the contrib extension?
    – petednz - fuzion
    Commented Aug 19, 2021 at 20:25
  • Could be. I've clearly missed the memo on that one as I wasn't aware of the change, but I'll check.
    – Graham
    Commented Aug 20, 2021 at 8:58

1 Answer 1

9

I wasn't aware that Flexmailer had moved from being a contributed extension to being a core extension, so consequently went ahead and installed the contrib extension as I normally would when getting Mosaico installed. So I ended up with two copies of the extension, which led to the error. To fix it I disabled Mosaico and Flexmailer extensions (need to disable Mosaico as it depends on Flexmailer), uninstalled the Flexmailer extension, deleted the extension files from my contributed extensions directory, then refreshed my extensions listing, installed and enabled Flexmailer (which is now listed as a core extension - i.e. the path to the code shows that it is a core extension), and then re-enabled Mosaico.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.