Updating to 8.x-2.0-beta20 from 8.x-2.0-beta19 causes WSD

Created on 26 February 2025, 13 days ago

Problem/Motivation

After updating from 8.x-2.0-beta20 from 8.x-2.0-beta19, an attempt to remove a field from a content type causes...

[26-Feb-2025 05:18:20 UTC] Uncaught PHP Exception Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: "You have requested a non-existent service "Drupal\entity_usage\PreSaveUrlRecorder"." at <site>\public_html\core\lib\Drupal\Component\DependencyInjection\Container.php line 159

No amount of cache clearing via a drush cr will fix this.

However, manually going into the database and performing a SQL command to TRUNCATE all cache_ tables does seem to fix the problem.

How is that?
I have seen this behaviour before many time, issuing multiple drush cr commands does not sort things but manually clearing out table does, surely a drush cr should be clearing out all cache_ tables or am I missing something here?

πŸ› Bug report
Status

Active

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom SirClickALot Somerset

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @SirClickALot
  • πŸ‡ͺπŸ‡ΈSpain marcoscano Barcelona, Spain

    I can't really reproduce this myself, are you able to provide the full stack trace to see if we can understand better what's going on?

    Thanks!

  • πŸ‡¬πŸ‡§United Kingdom alexpott πŸ‡ͺπŸ‡ΊπŸŒ

    I would have thought a drush updatedb might have got you out of this. I think @sirclickalot might need to investigate why drush cr is not rebuilding the container correctly that points to deeper issues on the site in question.

  • Merge request !130Add empty update β†’ (Merged) created by alexpott
  • πŸ‡¬πŸ‡§United Kingdom alexpott πŸ‡ͺπŸ‡ΊπŸŒ

    I've created an MR to add an empty update to force a container rebuild. I think that should address this.

  • Pipeline finished with Success
    13 days ago
    Total: 232s
    #434424
  • Pipeline finished with Skipped
    12 days ago
    #434591
  • πŸ‡ͺπŸ‡ΈSpain marcoscano Barcelona, Spain

    Thank you @alexpott!

    I have merged the MR since it's harmless and might help others.

    @sirclickalot could you please test if this solves the issue for you?

    Thanks,

  • πŸ‡¬πŸ‡§United Kingdom SirClickALot Somerset

    @marcoscano,

    Yes, I can confirm that after performing a composer update to 2.0.0-beta20 I was still seeing the same error but that a subsequent database update via a drush updatedb fixes the issue.

  • πŸ‡ͺπŸ‡ΈSpain marcoscano Barcelona, Spain

    OK, thanks for confirming πŸ‘
    I've tagged -beta21 with this fix.

  • πŸ‡¦πŸ‡ΊAustralia acbramley

    I hit this as well on a GovCMS site. Everything was fine in CI, tests passed, etc but for some reason after deploying, the cron containers were throwing service not found errors. Very curious why a drush cr wouldn't force a container rebuild but thank you for the quick release :)

Production build 0.71.5 2024