Drupal installation, Verify requirements step error message is not escaped properly

Created on 13 February 2020, over 5 years ago
Updated 23 June 2025, about 23 hours ago

Problem/Motivation

The media module requirements are double-escaped when there is a requirements issue.

Example here using the "Demo: Umami Food Magazine (Experimental)" installation profile

Proposed resolution

Use inline template for the description.

Remaining tasks

Create follow-up to discuss weighting requirements.

🐛 Bug report
Status

Needs work

Version

11.0 🔥

Component

media system

Created by

🇮🇳India Sivaji_Ganesh_Jojodae Chennai

Live updates comments and jobs are added and updated live.
  • Needs subsystem maintainer review

    It is used to alert the maintainer(s) of a particular core subsystem that an issue significantly impacts their subsystem, and their signoff is needed (see the governance policy draft for more information). Also, if you use this tag, make sure the issue component is set to the correct subsystem. If an issue significantly impacts more than one subsystem, use needs framework manager review instead.

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇦🇺Australia mstrelan

    This has moved to \Drupal\media\Install\Requirements\MediaRequirements::getRequirements. It's also not in system.module so I'm updating the component.

    I think now that this is in a much more isolated function we can use early returns for clarity. Something like this:

    public static function getRequirements(): array {
      $requirements = [];
      $destination = 'public://media-icons/generic';
      \Drupal::service('file_system')->prepareDirectory($destination, FileSystemInterface::CREATE_DIRECTORY | FileSystemInterface::MODIFY_PERMISSIONS);
      $is_directory = is_dir($destination);
      $is_writable = is_writable($destination);
      if ($is_directory && $is_writable) {
        return $requirements;
      }
      $t_args = ['%directory' => $destination];
      $error = !$is_directory
        ? $this->t('The directory %directory does not exist.', $t_args)
        : $this->t('The directory %directory is not writable.', $t_args);
    
      // The rest of the inline template / description bits here.
    }
    
  • Merge request !12446Refactor → (Open) created by mstrelan
  • Pipeline finished with Success
    about 23 hours ago
    Total: 1148s
    #528958
Production build 0.71.5 2024