Content entity query shouldn't be checking access

Created on 26 June 2023, over 1 year ago

Problem/Motivation

The entity query that finds content to migrate only finds content that is accessible to the anonymous user (when executed by the Drush command).

See also Access checking must be explicitly specified on content entity queries for Drupal 10 compatibility.

Steps to reproduce

Attempt to migrate a site that has video embed fields attached to content that is inaccessible to the anonymous user.

Proposed resolution

$query->accessCheck(FALSE);

Remaining tasks

  1. Upload and review patch
  2. Consider also removing access check from the query that looks for an existing media entity for each migrated video
🐛 Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

🇬🇧United Kingdom jacktonkin

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @jacktonkin
  • Issue was unassigned.
  • Status changed to Needs review over 1 year ago
  • 🇬🇧United Kingdom jacktonkin

    The attached patch removes access checking when finding content to migrate and explicitly includes access checking when looking for existing media entities to avoid creating duplicates.

Production build 0.71.5 2024