When trying to upload a module, I got the following error message:
- File Transfer failed, reason: Unable to remove to file /var/www/drupal/modules/webform/.gitignore
It should say 'Unable to remove THE file'.
The offending files are below:
/var/www/drupal/core/lib/Drupal/Core/FileTransfer/FTPExtension.php:
75 protected function removeFileJailed($destination) {
76 if (!ftp_delete($this->connection, $destination)) {
77: throw new FileTransferException("Unable to remove to file @file", NULL, array('@file' => $destination));
78 }
79 }
/var/www/drupal/core/modules/system/src/Tests/FileTransfer/TestFileTransfer.php:
47 function removeFileJailed($destination) {
48 if (!ftp_delete($this->connection, $item)) {
49: throw new FileTransferException('Unable to remove to file @file.', NULL, array('@file' => $item));
50 }
51 }
Comments
Comment #2
mayank_kaushik commentedHere is attached patch for Grammar issue with FTP error message.
Comment #3
mayank_kaushik commentedRE-attaching the patch with status update.
Comment #4
cilefen commentedRead the issue tag guidelines: https://www.drupal.org/node/1023102
Comment #5
mayank_kaushik commentedIssue tag updated. As version Changed to 8.3.x-dev for issue, Updated has been attached. In 8.3.x-dev version TestFileTransfer.php has been removed.
Comment #6
manojbisht_drupal commentedHi,
Please find attached patch, It has been generated with respect to 8.4.x, as new commit will be related to this branch.
Thanks,
Manoj Bisht
Comment #7
prash_98 commentedThe required changes happen and also the patch applies well with 8.4.x.
So changing to RTBC.
Comment #8
alexpottIt looks as if this was intended and not a mistake - ie it is trying to say the "to" file - as in destination. We also have the following exception messages in the same class.
In all cases it looks like the error would be improved by changing the
toto athebecause the directory / file is also specified in the message.Comment #9
Pavan B S commentedApplying the patch, please review
Comment #10
joe_carvajalIt seems to be OK according to the comment #8.
Comment #11
joe_carvajalUpdate issue with the event tag.
Comment #12
cilefen commentedIsn't this one actually "change to"?
Comment #13
hazaI agree with that. I think the "to directory" should stay the same, and only the one (the file related error) might be changed.
Comment #14
ajmantis commentedI will work on this.
Comment #15
ajmantis commentedI have make changes according to #13
Comment #16
darius.restivan commentedFixed
Comment #17
alexpottRe #12 and #13.... nope it is not "change to" here "to" means destination in same way it is being used in the file example.I'm wrong
if (!ftp_chdir($this->connection, $directory)) {Comment #18
alexpottBut still we have this later...
Comment #19
alexpottAlso for
To actually be clear we should change it to:
Comment #20
joe_carvajalOK! Thank you Alexpott, I'll do it then.
Comment #21
joe_carvajalComment #22
joe_carvajalComment #23
dinesh18 commentedReviewed the patch mentioned in comment #21 and it is working as expected.
Comment #24
joe_carvajalSo, should we change the issue to RTBC?
Comment #25
sahilsharma011 commented@joe_carvajal I reviewed the patch mentioned in #21 on 8.4.x branch. It works as expected. It can be changed to RTBC as it fixes all the grammar issues for aforementioned error messages.
Comment #26
juanjesustrigo commentedAccording to comments #23 and #25 change issue to RTBC.
Comment #27
alexpottCommitted a908c19 and pushed to 8.4.x. Thanks!
8.3.x is now in a freeze I'm not sure we should backport to 8.3.1 because something in contrib or custom might be testing against these exception messages and it is not worth breaking that in a patch release.