SupportedReleaseValidator does not provide translatable messages for all errors

Created on 25 March 2024, 6 months ago
Updated 16 April 2024, 5 months ago

Problem/Motivation

In SupportedReleaseValidator

if ($unknown_packages) {
      $summary = $this->formatPlural(
        count($unknown_packages),
        'Cannot update because the following new or updated Drupal package does not have project information.',
        'Cannot update because the following new or updated Drupal packages do not have project information.',
      );
      $event->addError($unknown_packages, $summary);
    }

$unknown_packages this is array of string but should be translatable.

Found in πŸ› Possible random failure in build tests for cron updates Postponed . The cause of the random failure was that AutoUpdates, from 3.0.x to 3.1x(but only very rarely) itself was being updated when you tried to update core. But we couldn't see the real error because of this translation problem.

Steps to reproduce

Proposed resolution

Ensure \Drupal\package_manager\Event\PreOperationStageEvent::addError is sent the correct arguments

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Fixed

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States tedbow Ithaca, NY, USA

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024