After installing on Drupal 9.0.2 I got
ServiceNotFoundException: You have requested a non-existent service "entity.manager"

Following patch should solve the issue

Comments

p4trizio created an issue. See original summary.

p4trizio’s picture

sgroundwater’s picture

I hit this snag while doing some internal testing on a D9 site. I got a little carried away and enabled a bunch of modules at once, forms_steps being one of them. This issue blew out my site w/ a non-descriptive "site error".

"drush ws" gave me ...
Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "entity.manager". in Drupal\Component\DependencyInjection\Container->get

Seeing a similar error over here ...
https://www.drupal.org/project/notificationswidget/issues/3146510

... lead me to this search: '
grep -R "entity\.man" *
This search hit on this patched line of code, but I got one other hit that I think needs fixing too.
> forms_steps/tests/src/Kernel/KernelTestBase.php

Because this error will blow out sites, it would be nice to see if we can push along a dev update. (I'm attempting a patch to update the test file.)

sgroundwater’s picture

StatusFileSize
new1.49 KB
p4trizio’s picture

Status: Active » Needs review
mrinalini9’s picture

Reviewed patch #4, looks good to me. Also, I have tested this on Drupal-9.0.0 and the module has been installed successfully without any errors. But still there are some test cases failed for D9.0, I think we need to fix it as well.
Thanks!

nicoloye’s picture

StatusFileSize
new5 KB

Hello,

thanks for your great work, this patch should fix the tests failures and warnings on D9.0.

nicoloye’s picture

Sorry for the wrong versions selected on the CI, I badly messed up.
Drupal 9 core requires MySQL 5.7+ or MariaDB 10.3.7+ (should have verified this before running the tests).

It seems things are alright for all current versions and already Drupal 9.1.x branch.

mrinalini9’s picture

@nicoloye, Thanks for the patch, looks good to me. I have tested this patch #7 on Drupal Versions: 9.0.0 and 9.1.0-dev and found that the module installed successfully without any errors. Also, it passed all the test cases as well. So, for me, it is RTBC.
Thanks!

antoniogr’s picture

StatusFileSize
new524 bytes

Using the Drupal\Core\Entity at /src/Plugin/Block/FormsStepsProgressBarBlock.php works fine for me, here is my patch.

Edit: I have tested my patch again and it is not working

jonloh’s picture

Status: Needs review » Reviewed & tested by the community

Tested patch #7 on Drupal 9 and it seems to be working fine.

maxpah’s picture

Hello,

Patch #7 tested and live on production, working well, so, when this will be included in a stable release ?

Thanks for the patch :)

nicoloye’s picture

Hello MaxPah,

I'm currently reviewing multiple issues that have been recently RTBCed.
I'm preparing a release that should be available in the two following weeks.

Thanks for the great work !

  • nicoloye committed ce96db1 on 8.x-1.x
    Issue #3159391 by p4trizio, nicoloye, sgroundwater, antoniogr,...
nicoloye’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

cocq’s picture

After upgraded D 8.9.20 to D 9.4.6, I have the following error when I click on "Configuration".

"Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "entity.manager". in Drupal\Component\DependencyInjection\Container->get() (line 156 of core\lib\Drupal\Component\DependencyInjection\Container.php). "

I saw the patchs above, but I do not find the class FormsStepsProgressBarBlock.php to update the file.

Where is it?????

Regards
ec