-1

I recently upgraded a site to Drupal 9. For content types that have media type as PDF documents, now I am not able to edit or save any uploaded pdf file. The drupal log shows this error.

Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "user.private_tempstore". in Drupal\Component\DependencyInjection\Container->get() (line 157 of /app/web/core/lib/Drupal/Component/DependencyInjection/Container.php).

Has anyone come across this issue? I am not sure what is causing this error. Any guidance to resolve this issue please?

1
  • You can't debug this without a full error message. For Drupal 9 you have to enable the display of full error messages. Or use the current Drupal 10 version which displays log entries by default with a full stack trace. See drupal.stackexchange.com/questions/317940/…
    – 4uk4
    Dec 28, 2023 at 13:34

1 Answer 1

1

Yes, other people have come across this. You can find them by searching the Internet for ‘You have requested a non-existent service "user.private_tempstore"’. It means that you did not complete the preparatory work for upgrading. A module or theme on the site is not compatible with Drupal 9. user.private_tempstore was deprecated in 2018.

It is not possible to say more in this answer without more information from you. But here is a tip: search the site code for “user.private_tempstore”.

Further I will mention that at the time I write this, Drupal 9 is end-of-life. It isn’t safe to use. You should move to Drupal 10 as soon as possible.

1
  • Thanks for the tip. Yes it was due to "user.private_tempstore" in a custom module. I will soon be moving to Drupal 10
    – 9Lyfe
    Dec 28, 2023 at 23:34

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.