In core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php, sometimes there is an empty item in the $this->_serviceIds
array that causes the following PHP error.
Uncaught PHP Exception Symfony\\Component\\DependencyInjection\\Exception\\ServiceNotFoundException: "You have requested a non-existent service ""." core/lib/Drupal/Component/DependencyInjection/Container.php line 150
Here are steps to reproduce this issue using the payment module.
- Install Drupal 8.8.x.
- Install the payment module and dependencies.
- Add a Payment form field to a content type.
- Create a new node, adding at least 2 payment options and save the node.
- Edit the node and try to remove one of the payment options. When attempting to save, the error occurs and payment options cannot be deleted.