Retroactive update crashes on Drupal 10 (fix included)

Created on 14 May 2023, about 1 year ago
Updated 24 July 2023, 11 months ago

Problem/Motivation

The following errors are from drupal 10 upgrade:

  1. Streamline field widget hooks β†’
  2. Access checking must be explicitly specified on content entity queries β†’

Steps to reproduce

Any updates attempt causes this.

Proposed resolution

Insert the second line here to comply with Drupal 10 requirement:

  $result = $query->condition($entity_info->getKey('bundle'), $field_config->getTargetBundle())
    ->accessCheck(FALSE)
    ->condition("{$field_config->getName()}.target_id", '', '<>')
    ->addTag('DANGEROUS_ACCESS_CHECK_OPT_OUT')
    ->execute();

Update the hook filefield_paths_field_widget_form_alter to filefield_paths_field_widget_single_element_form_alter

Remaining tasks

  1. Test
  2. Review
  3. Commit
πŸ› Bug report
Status

Fixed

Component

Code

Created by

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

Comments & Activities

Production build 0.69.0 2024