Logger does not record new file destination on failed move

Created on 7 April 2016, almost 9 years ago
Updated 4 December 2024, about 2 months ago

In filefield_paths.inc at the bottom:

     else {
          \Drupal::logger('filefield_paths')
            ->notice(t('The file %old could not be moved to the destination of %new. Ensure your permissions are set correctly.', [
              '%old' => $file->getFileUri(),
              '%new' => $file->getFileUri(),
            ]));

Makes no sense, it's logging the same destination for %old and %new.

Perhaps it needs either

'%new' => $new_file->getFileUri(),

or

'%new' => $destination,

?

🐛 Bug report
Status

Needs work

Version

1.0

Component

Code

Created by

🇬🇧United Kingdom jonathanshaw Stroud, UK

Live updates comments and jobs are added and updated live.
  • Needs reroll

    The patch will have to be re-rolled with new suggestions/changes described in the comments in the issue.

Sign in to follow issues

Comments & Activities

Not all content is available!

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

Production build 0.71.5 2024