Closed (fixed)
Project:
Metatag
Version:
2.2.1
Component:
Integration with other module
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 Oct 2026 at 22:10 UTC
Updated:
9 Nov 2026 at 11:05 UTC
Jump to comment: Most recent
Comments
Comment #2
fherman95 commentedDrupal core 10.6.20
Comment #3
dkmishra commentedThanks for the report. Could you please share the steps to reproduce this issue, so we can confirm it on our side?
Comment #4
fherman95 commentedI upgraded with composer using the command from the Drupal website. I have Drupal core 10.6.20 on this server. I had to revert to the previous version to recover. I have now uninstalled Metatag from all the sites that had installed it to avoid problems with Metatag in the future.
Comment #5
shubhamgoel commentedHi @fherman95,
The Metatag code is fine. metatag.services.yml registers Drupal\metatag\Hook\OutputHooks, and the class exists in src/Hook/. The error most likely came from the compiled container still being the one built before the 2.2.1 update.
If the site still throws the error, run
drush cragain on that environment. After any deploy that updates Metatag, run drush updb -y && drush cr. If you can't run drush, php core/scripts/rebuild_cache.php rebuilds the cache too.Comment #6
damienmckennaI'm very sorry about this bug. Because of some changes to the d.o infrastructure tests currently only run against Drupal 11, so I missed that something was broken on D10. We'll fix it.
Comment #8
damienmckenna@shubhamgoel was correct - the service definition exists, the only reason this error would have showed up was because the caches were stale.
@fherman95: Please try clearing the caches after you update any codebase.
I've added an empty update script to force this step, this will be helpful when updating to the upcoming 2.2.2 release for any sites on 2.2.0.
Comment #10
damienmckenna