Problem/Motivation

Service 'access_check.node.add' is removed in D10.

Steps to reproduce

With this module installed on D10, clearing and rebuilding Drupal caches leads to the error:

In CheckExceptionOnInvalidReferenceBehaviorPass.php line 86:
                                                                               
  The service "epub_reader_framework.reader_publication_form_alter" has a dep  
  endency on a non-existent service "access_check.node.add". Did you mean one  
   of these: "access_check.default", "access_check.theme", "access_check.node  
  .preview"?                                                                   
                                                                               

Proposed resolution

Replace with a check against the node access handler, retrieved from the entity_type storage.

$access_check = $this->entityTypeManager
        ->getAccessControlHandler('node');
      if ($access_check->createAccess('reader_chapter', $user, [], FALSE)) {..}
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

JoshHytr created an issue. See original summary.

joshhytr’s picture

Status: Active » Needs review

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

scott_euser’s picture

Status: Needs review » Fixed

Looks great thanks! I am going to merge this into dev and test more thoroughly with your merge requests combined

Status: Fixed » Closed (fixed)

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