Problem/Motivation

Drupal::entityManager has been removed in Drupal 9.x

Steps to reproduce

Install module on Drupal 9 or above. Error occurs on site:

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

Proposed resolution

Apply the provided patch which changes the "entity.manager" to "entity_type.manager".

Remaining tasks

Review

Issue fork block_node-3392617

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

tamaspresing created an issue. See original summary.

tamaspresing’s picture

Patch to fix the issue. Please review.

tamaspresing’s picture

Assigned: tamaspresing » Unassigned
Madhu Kumar M E’s picture

StatusFileSize
new185.08 KB

Hi i applied patch #3 it's not getting applied, i applied with proper path still i could not able to apply i it , attaching screenshot for the same

sarwan_verma made their first commit to this issue’s fork.

abhishek_virasat made their first commit to this issue’s fork.

abhishek_gupta1’s picture

Status: Active » Needs review

@tanc, as I can see get('entity.manager') is already replaced with get('entity_type.manager') I added core_version_requirement for drupal10 and issue is resolved. Please review the MR.

tamaspresing’s picture

@abhishek_gupta1 Looks good to me.