Problem/Motivation
I can't download the new dutch translationfile although it exist on the ftp site (drupal-11.4.4.nl.po).
I try this link on the user interface: .../admin/reports/translations
Steps to reproduce
Update Drupal core using Composer package manager and then update the database using drush or by visiting .../update.php
Clear the site cache using drush or via the UI. The Status report looks fine and does not report any errors relating to this issue.
However, the translation stays on the original 11.3.13 version because the system doesn't find the new file.
Proposed resolution
Discover if there has been a change to core starting in version 11.4.x that is causing this bug. If so, apply a code fix to the code. Add a test to prove that the bug has been fixed.
Remaining tasks
- Check the permissions on the sites/files/translations/ directory
- Check the permissions on the sites/files/translations/drupal-11.3.13.nl.po file
- Test out manually copying the drupal-11.4.4.nl.po file into sites/files/translations/ after moving/deleting the 11.3 file
User interface changes
N/A
Introduced terminology
N/A
API changes
N/A
Data model changes
N/A
Release notes snippet
N/A
Comments
Comment #2
ericvlComment #3
cilefen commentedComment #4
cilefen commentedComment #5
cilefen commented@ericvl, I think this is the better place for this issue. Could you describe the exact problem you're having when downloading the file? For example, what is the HTTP error code?
Comment #6
ericvl@cilefen
First, thank you for your quick response.
After updating from 10.3 to 10.4 and starting the update.php, the translating to Dutch is still on 10.3. To check this, I have compared both translation-files (.po files from the ftp site) and checked with the translations on the site.
I've then seleted the .../admin/reports/translations page and searched for new translations but none were found. So, if the new core translating file was not found, no file was downloaded too. Although we need the new 10.4 translation file to update the database.
Sorry for my poor English but I hope you'll understand.
Greetings
Eric
Comment #7
cilefen commentedComment #8
ericvlHello,
Because this issue is seen after an update from core 11.3.13 to 11.4.4, I wanted to test the translate functionality of the new version. Therfore, I added a new module (webform) but not the latest release but the one before the latest version. This way, I could test if an update to the latest version of the module would ask for a new translation file to be downloaded.
I've tested this with both the D11.3.13 version as well as the D11.4.4 version and both versions worked out perfectly.
So, the translation functionality of the D11.4.4 version is ok (fetching a new file). The only difference that I can think of is between the translationfiles of core and webform. The new core file is not found on the ftp server although it is there or there is another reason that the new file is not found.
Comment #9
quietone commented@ericvl, is this a problem on Drupal 10 or Drupal 11 or both? I ask because comment #6 is about Drupal 10 but all the others are about Drupal 11.
Comment #10
ericvl@cilefen
Oh, I'm so sorry for the confusion. You are so right. The issue is after I did an update from 11.3.13 to 11.4.4. Version 10 has nothing to do with this.
I have corrected the title and the version of this issue too now to represent that correct version.
Thank you for the remark on #6 and sorry again.
Comment #11
ericvlI did another test today.
My initial test when I got this problem was when I updated drupal from 11.3.13 to 11.4.4.
Now, I have tested this with an update from 11.3.13 to 11.4.0. Again, the same problem: could not find the new 11.4.0 tranlation to Dutch.
Then an update from 11.4.0 to 11.4.1: here I could update the translation to the new version.
After every new update to a higher patch (11.4.2, 11.4.3 and 11.4.4) I could update the translation.
Conclusion: after every update from a 11.3.x release to an 11.4.x release, I'm having this issue. Updating between 11.4.x releases don't have this issue.
I hope this helps.
Maybe a clue: the locale.settings in the configuration settings are changed between the two minor versions. The path where the translations files are stored are gone in the locale.settings after updating to 11.4.x. Maybe the functioality that tries to find the previous translationfile just needs this. Just a thought.
Remark to mitigate this issue: if you want to have the correct translation for the 11.4.4 version, first install 11.4.3, update database, try downloading the translation file (will not work), update to 11.4.4 and again update database and download new translation file.
Comment #12
oily commented@ericvi Thank you for specifying the exact Drupal versions where this issue arises. Looking inside core of the 11.3 and 11.4 (not working) versions that you specify, I found the install.core.inc file inside core/includes. It seems to contain the code that determines where the translation files are downloaded to. Which is sites/files/translations. That location has not changed across 11.3 and 11.4.
To eliminate sources of the problem, it could be worth checking that there are no complications in the case of the 11.4 upgraded site that fails to allow the download. Worth checking the directory and file permissions on sites/files/translations/? And the permission on the existing dutch translation file.. Then perhaps try deleting or temporarily moving the existing translation file.. Also, is it just the dutch translation file? Or does the issue affect all translation files?
It could be worth testing this with a selection of translation files, not just the Dutch one?
What happens if the file is manually copied into sites/files/translations/?
I have updated the IS with the above steps. Assuming this is a bug, have added N/A to most of IS sections.
Comment #13
oily commentedComment #14
oily commentedI have taken the liberty of changing the category. If it is a bug as it might be, it will also need a test I believe to prove it has been fixed. I dont think a Unit test, more likely it would be a functional test or kernel test.
Comment #15
oily commentedComment #16
oily commentedFixed some typos in the IS added the proposed solution and added detail to the existing description of the issue to make it easier to reproduce.
Comment #17
ericvl@oily
Thank you for your response and making the corrections to my text.
These are my findings:
I know but downloading is not the problem. It is the detection of wether it should download a new translation file or not. If you access the .../admin/reports/translations page, you should access the link "Check manually". The result is here: no new translation for core.
The permissions on the original po-file and the directory are read-write. Otherwise, an update from 11.4.3 to 11.4.4 should also fail. May I remark that the functionality of downloading and storing in the translation folder is not the issue but that it can not detect that there should be an update of the file after all. Downloading is only done if it detects that there should be a new one. See my comment #11.
I have downloaded the 11.4.4 po-file from the ftp site and copied it to the translating directory to no avail. Here again, the detection says: NO, and the new file is not intrepreted.
Then I added a new language (German) and all translation files for core and all modules and themes were detected and loaded into the same translation folder.
It seems that when it worked out one time, it does it all the time. It seems that the functionality is not allready enabled after the first database update but after another update in the range 11.4.0 to 11.4.4, it works. Only the update from 11.3 to 11.4 doesnt't work.
I hope this will help. If I have have to do other tests, please ask. No trouble at all.
Greetings
Comment #18
oily commentedThank you @ericvl for your detailed responses in #17. I think there is plenty of detail now to enable myself or (hopefully) others to find out the cause. It would seem worth checking/ debugging the code that is executed on the submission of the form that you have identified.
Comment #19
ericvlWhat's more:
If I add the German language before I update from 11.3 to 11.4 then neither Dutch nor the German language is detected to be updated with the new version. What proves that it has nothing to with the kind of language.
Greetings
Comment #20
ericvlHello,
I have tried to understand how the locale module works and these are my findings:
The module works with 2 "lists of projects". A "current list" and a "previous list". Both lists are list of modules, themes and core instances with their respective versions in it. The lists are made of the information found in all *.info.yml files in the installation. The "current list" is beeing copied to the "previous list" after every download of the language files and translation update in the database.
How it normally works; (update between 2 patch versions of 11.3 core e.g. 11.3.13 to 11.3.14)
The user does a composer update of the core, an update of the database and tries to update the language. In the "previous list ", there is a core project with version 11.3.13. The "current list" is build with the new version of core and the result in the "current list" is 11.3.14.
Both lists are compared and for every project in the lists, the version is compared. In this case, the versions of core are different and the new translation file is downloaded and used to update the translation in the database. Every thing OK.
How it works when you to try to update between 2 minor versions (e.g. 11.3.13 to 11.4.4)
The user does a composer update of the core, an update of the database and tries to update the language. I must say: there was something different here on the translation page. Normally, there is a value of how many day the last translation did happen after the words "Last checked :". Now, the word "never" was there. After some investigation I found that there was no "previous list" anymore. The reason is that in the update process of the database a post operation is launched for the locale module. This operation clears or deletes the "previous list".
Now, the "find new translation process" again builds the new "current list", tries to compare it with the "previous list" but does NOT find any. So, it can not find any projects that needs an translation update, it copies the "current list" into the "previous list" and the latter is then up-to-date with the current situation. (11.4.4) But the new translation file was not downloaded nor used for an translation update.
By the way, the next time a new core will be released, the functionality "as is" will work because the "previous list" is up-to-date.
Conclusion: the post-update in the locale module of core is the reason that we have this problem. My remark in #11 is still the only method to solve this problem.