Follow-up for #1804702-82: Display interface translation status (See also comment #76.)
Also follow-up for #1804688-101: Download and import interface translations (See also comment #119-123)
[was there another issue Gabor opened related? list it.]

Problem/Motivation

Some people get an error, some do not.

Proposed resolution

No proposed resolution yet. More investigation needed.

Remaining tasks

  • Investigate more.
  • Document steps to reproduce that work for everyone or describe the conditions in which the error happens and when it does not (like permissions, or directory group owner).

User interface changes

(new or changed features/functionality in the user interface, modules added or removed, changes to URL paths, changes to user interface text)

API changes

(API changes/additions that would affect module, install profile, and theme developers, including examples of before/after code if appropriate)

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

YesCT’s picture

Title: Copy of Display interface translation status » translations imported but error shows: .po could not be copied because the destination directory translations:// is not configur
YesCT’s picture

Providing a lot of detail here as we try and track down why I have this problem but Sutharsan does not.
Lets get a few more people to try it also.

I have a mac with MAMP 2.0.5, PHP Version 5.3.6

Eliminating as many variables as possible by doing it totally from scratch.

0. from scratch

git clone --recursive --branch 8.x http://git.drupal.org/project/drupal.git
That should be equivalent to (making sure to get rid of config files left over from a previous install)
git checkout 8.x
git pull --rebase
git reset --hard
sudo rm -r sites
git checkout sites

1. check files directory

ls -l sites/default
shows just the default settings.php file. no files directory.

2. install

drush -y si --account-pass=admin --db-url="mysql://root:root@localhost/d8-patch" --site-name=8.x
That should be equivalent to installing in the ui.

3. check files directory

ls -l sites/default
is different, including
drwxr-xr-x 5 ctheys staff 170 Dec 8 14:24:41 2012 files/
ls sites/default/files
shows no translation directory (as expected)

4. the files configuration page before enable locale

t-s01-file_settings_before_locale-2012-12-08_1430.png

5. enable locale module

(I did it in the ui under Extend)

6. the files configuration page after enable locale

[edit: fix copy paste error, said "before"]
t-s02-file_settings_after_enable_locale-2012-12-08_1435.png

7. watchdog

t-s03-watchdog-2012-12-08_1437.png

The file entry at the top, after installed locale is unrelated about cannot remove a twig file.
"The file /Users/ctheys/foo/d8-patch/sites/default/files/php/twig was not deleted because it does not exist."

8. check files directory

ls sites/default/files
(wow) translations directory is there.
ls -ld sites/default/files/translations
drwxrwxr-x 3 ctheys staff 102 Dec 8 14:35:18 2012 sites/default/files/translations/

meh. ok. getting tamper.

9. get tamper from the sandbox so can simulate automatic downloading from l.d.o

I believe this downloads to a temporary directory, and then after import, copies the .po files to the translations directory that is set in the file settings (sites/default/files/translations/)
From http://drupal.org/sandbox/sutharsan/1833370
copy the git command
change directory first cd modules
git clone http://git.drupal.org/sandbox/sutharsan/1833370.git locale_tamper

10. enable locale_tamper under Extend

11. add german

admin/config/regional/language/add

progress bar
says 5 of 35 better formats, etc.
Then get error. with a message that the import worked.

t-s04-error-2012-12-08_1500.png

watchdog has messages like
file "File temporary://devel-7.x-1.3.de.po could not be copied because the destination directory translations:// is not configured correctly."
and then locale "Translations imported: 1567 added, 57 updated, 0 removed."

12. try saving the file settings page

admin/config/media/file-system

13. add dutch language

do not get the error.
t-s05-after_save_file_settings-2012-12-08_1505.png

thoughts

I thought maybe the .htaccess was changed when I hit save on the file settings form.

but:

$ ls -l sites/default/files/translations/
total 8
drwxrwxr-x  3 ctheys  staff  102 Dec  8 14:35:18 2012 ./
drwxr-xr-x  7 ctheys  staff  238 Dec  8 14:34:08 2012 ../
-r--r--r--  1 ctheys  staff  107 Dec  8 14:35:18 2012 .htaccess
[~/foo/d8-patch]
02:57 PM [YesCT]  (8.x) 
544 $ ls -l sites/default/files/translations/
total 96
drwxrwxr-x  10 ctheys  staff    340 Dec  8 15:05:10 2012 ./
drwxr-xr-x   7 ctheys  staff    238 Dec  8 14:34:08 2012 ../
-r--r--r--   1 ctheys  staff    107 Dec  8 14:35:18 2012 .htaccess
-rw-rw-r--   1 ctheys  staff    924 Dec  8 15:05:04 2012 better_formats-7.x-1.0-beta1.nl.po
-rw-rw-r--   1 ctheys  staff   1161 Dec  8 15:05:05 2012 ckeditor_link-7.x-2.2.nl.po
-rw-rw-r--   1 ctheys  staff    516 Dec  8 15:05:05 2012 compact_forms-7.x-1.0.nl.po
-rw-rw-r--   1 ctheys  staff   2370 Dec  8 15:05:06 2012 context-7.x-3.0-beta4.nl.po
-rw-rw-r--   1 ctheys  staff  17535 Dec  8 15:05:09 2012 ctools-7.x-1.2.nl.po
-rw-rw-r--   1 ctheys  staff   1398 Dec  8 15:05:09 2012 delta-7.x-3.0-beta11.nl.po
-rw-rw-r--   1 ctheys  staff   3968 Dec  8 15:05:10 2012 devel-7.x-1.3.nl.po

.htaccess has the same time stamp. the same permissions are on the translations directory (.)

So... I dont know.

I checked the watchdog. And there is no entry between the message the German translations were imported and the adding of Dutch. (no log message as a result of just saving the files settings form.)

YesCT’s picture

google search for
"could not be copied because the destination directory" site:drupal.org
shows issues like
#1588056: The specified file temporary://filet8OKMQ could not be copied, because the destination directory is not properly configured

maybe the message about cannot delete twig because it does not exist is related after all. perhaps getting that error because the system had tried to copy a twig file but it didn't work and I'm just seeing the error from when it tried to delete something it expected to be there.

I could try clearing caches... maybe right after enabling locale?

csc4’s picture

Issue summary: View changes

I had this problem and for me the issue was that Locale install (7.31) didn't create the directory sites/all/translations defined at admin/config/regional/language/update

Don't know why, don't know why it wasn't an issue on the Status report page but creating that directory fixed it for me...

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

joshmccormack’s picture

In addition to making sure you have a translations directory created and set, make sure to look at admin/reports/status and see that you have tmp and private configured. Without those, translation updates won't download.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.8.x-dev

Drupal 8.6.x will not receive any further development aside from security fixes. Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.2.x-dev

Drupal 8 is end-of-life as of November 17, 2021. There will not be further changes made to Drupal 8. Bugfixes are now made to the 9.3.x and higher branches only. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.15 was released on June 1st, 2022 and is the final full bugfix release for the Drupal 9.3.x series. Drupal 9.3.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.4.x-dev branch from now on, and new development or disruptive changes should be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.9 was released on December 7, 2022 and is the final full bugfix release for the Drupal 9.4.x series. Drupal 9.4.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.5.x-dev branch from now on, and new development or disruptive changes should be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.