Closed (duplicate)
Project:
Drupal core
Version:
9.3.x-dev
Component:
file.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
8 Aug 2017 at 13:56 UTC
Updated:
22 Apr 2022 at 11:33 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
_Archy_ commentedComment #4
wim leersGreat catch! This still needs test coverage though: a failing test to show that the current code does not cover this edge case. Then applying your patch should make the test pass.
Comment #5
wim leersComment #6
eric115 commentedI'm not a big fan of declaring variables in logic operators for use outside of block-scope. What do you think about something like this for readability?
Comment #7
borisson_Setting to needs work for the tests (#4), i also agree with #6.
Comment #8
dinesh18 commentedHere is an updated patch and interdiff as per comment #6.
Still needs tests.
Comment #10
MHGR commentedHi,
I have same issue, While updating User Picture using REST by PATCH method, I have try to set "target_id":xx,
but I have got response like
{
"message": "Unprocessable Entity: validation failed.\nuser_picture.0.target_id: This entity (file: xx) cannot be referenced.\n"
}
any one help in this.
Comment #11
MHGR commentedHi,
any one got solutions for this issue.
Comment #18
quietone commentedLooks like this was fixed in a later issue #2956814: FileValidationConstraintValidator assumes that the file exists.
Therefore, closing as a duplicate. If that is wrong, reopen the issue, by setting the status to 'Active', and add a comment.
Thanks!