Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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 }
Comment | File | Size | Author |
---|---|---|---|
#21 | grammar-issue-with-ftp-error-message-2859029-21.patch | 2.36 KB | joe_carvajal |
#15 | interdiff.txt | 1.2 KB | ajmantis |
#15 | grammar-issue-with-ftp-error-message-2859029-15.patch | 1.4 KB | ajmantis |
#9 | grammar.txt | 1.06 KB | Pavan B S |
#9 | grammar-issue-with-ftp-error-message-2859029-10.patch | 2.34 KB | Pavan B S |
Comments
Comment #2
mayank_kaushik CreditAttribution: mayank_kaushik as a volunteer and at InfoBeans Technologies Limited commentedHere is attached patch for Grammar issue with FTP error message.
Comment #3
mayank_kaushik CreditAttribution: mayank_kaushik as a volunteer and at InfoBeans Technologies Limited commentedRE-attaching the patch with status update.
Comment #4
cilefen CreditAttribution: cilefen commentedRead the issue tag guidelines: https://www.drupal.org/node/1023102
Comment #5
mayank_kaushik CreditAttribution: mayank_kaushik as a volunteer and at InfoBeans Technologies Limited 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 CreditAttribution: manojbisht_drupal as a volunteer and at QED42 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 CreditAttribution: 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
to
to athe
because the directory / file is also specified in the message.Comment #9
Pavan B S CreditAttribution: Pavan B S at Valuebound 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 CreditAttribution: 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 CreditAttribution: ajmantis at La Drupalera by Emergya commentedI will work on this.
Comment #15
ajmantis CreditAttribution: ajmantis at La Drupalera by Emergya commentedI have make changes according to #13
Comment #16
darius.restivan CreditAttribution: 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 CreditAttribution: Dinesh18 as a volunteer 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 CreditAttribution: sahilsharma011 at Google Summer of Code 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 CreditAttribution: juanjesustrigo at La Drupalera by Emergya 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.