Missing log file is a fatal error that breaks the log UI

Created on 3 January 2024, about 1 year ago
Updated 15 May 2024, 10 months ago

Problem/Motivation

The website encountered an unexpected error. Please try again later.

Drupal\Core\File\Exception\InvalidStreamWrapperException: in Drupal\Core\File\FileUrlGenerator->doGenerateString() (line 106 of core/lib/Drupal/Core/File/FileUrlGenerator.php).
Drupal\Core\File\FileUrlGenerator->generateAbsoluteString('private://feeds/log/1162/source/http_fetcher_CckOea') (Line: 32)
Drupal\feeds_log\Plugin\Field\FieldFormatter\FileUriLinkFormatter->viewElements(Object, 'en') (Line: 89)

Steps to reproduce

The log module stores the logs in files and it doesn't check to see if the files exist and are readable before trying to load them which is a fatal error. So, if one of the files is ever missing or damaged, the interface no longer loads.

Proposed resolution

Check that a log file is valid before trying to stream wrap it.

Remaining tasks

Write patch.

User interface changes

None.

API changes

None.

Data model changes

None.

🐛 Bug report
Status

Fixed

Version

3.0

Component

Code

Created by

🇺🇸United States Greg Boggs Portland Oregon

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