Problem/Motivation

The %directory replacement variable does not exist in the watchdog message on line 895 of includes/file.inc. It currently leaves the user with an unhelpful directory/destination of %destination.

Proposed resolution

The solution is to replace the string %directory with %destination, as that is the variable replacement used throughout the file_unmanaged_copy function.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

gbrands’s picture

Status: Active » Needs review
FileSize
955 bytes

Here is a patch that hopefully fixes this issue.

amontero’s picture

Version: 7.x-dev » 8.x-dev
FileSize
1.32 KB

Patch to 7.x applies OK and looks good to me.
However, since the bug is also present in 8.x, this issue should address current dev version before being backported. Patch against 8.x HEAD attached.

slashrsm’s picture

Status: Needs review » Reviewed & tested by the community

Looks OK. It is a simple patch so I'd say it is RTBC.

catch’s picture

Version: 8.x-dev » 7.x-dev
Status: Reviewed & tested by the community » Patch (to be ported)
Issue tags: +Needs backport to D7

Looks fine, don't think we need an explicit test for this. Committed/pushed to 8.x, looks like this needs backport to 7.x.

slashrsm’s picture

Status: Patch (to be ported) » Needs review
FileSize
955 bytes

Here it is...

amontero’s picture

Status: Needs review » Reviewed & tested by the community

Thanks! Both #1 and #5 patches fix it for 7.x (they are bitwise identical).

David_Rothstein’s picture

Status: Reviewed & tested by the community » Needs work

For Drupal 7, we should fix this the opposite way (so we don't break translations).

In other words, leave "%directory" as the variable in the translatable string, but change the array to use %directory rather than %destination.

slashrsm’s picture

Status: Needs work » Needs review
FileSize
951 bytes

Here it goes....

David_Rothstein’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me as long as tests pass.

David_Rothstein’s picture

Status: Reviewed & tested by the community » Fixed

Automatically closed -- issue fixed for 2 weeks with no activity.