Problem/Motivation

A prior change replaced the core node_access_rebuild() function call with \Drupal::service('\Drupal\node\NodeAccessRebuild')->rebuild(); in varbase.profile. However, \Drupal\node\NodeAccessRebuild is a class, not a registered service id, so the container throws a ServiceNotFoundException. As a result, a fresh Varbase 10.1.x install on Drupal 11.4 fatals during installation with:

Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "\Drupal\node\NodeAccessRebuild".

Steps to reproduce

  1. Install Varbase 10.1.x on Drupal 11.4.
  2. Observe the fatal ServiceNotFoundException for the non-existent \Drupal\node\NodeAccessRebuild service, thrown from varbase.profile.

Proposed resolution

Call the core node_access_rebuild() function instead, which exists and is not deprecated in Drupal 11.4. Replace the broken line in varbase.profile:

\Drupal::service('\Drupal\node\NodeAccessRebuild')->rebuild();

with:

node_access_rebuild();

Remaining tasks

  • ✅ File an issue about this project
  • ✅ Addition/Change/Update/Fix to this project
  • ✅ Testing to ensure no regression
  • ➖ Automated unit/functional testing coverage
  • ➖ Developer Documentation support on feature change/addition
  • ➖ User Guide Documentation support on feature change/addition
  • ➖ UX/UI designer responsibilities
  • ➖ Accessibility and Readability
  • ❌ Reviewed by a human
  • ❌ Code review by maintainers
  • ❌ Full testing and approval
  • ❌ Credit contributors
  • ❌ Review with the product owner
  • ✅ Update Release Notes
  • ✅ Release varbase-10.1.1, varbase_project-10.1.1

User interface changes

  • N/A

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

  • N/A

Issue fork varbase-3609165

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

rajab natshah created an issue. See original summary.

  • rajab natshah committed 389c7ab5 on 10.1.x
    fix: #3609165 Resolve the NodeAccessRebuild service by its class-name id...
rajab natshah’s picture

Assigned: Unassigned » josebc
Issue summary: View changes
Status: Active » Needs review
Issue tags: +varbase-10.1.1, +varbase_project-10.1.1
rajab natshah’s picture

Assigned: josebc » mohammed j. razem
rajab natshah’s picture

rajab natshah’s picture

Assigned: mohammed j. razem » Unassigned
Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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