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.
modules/locale/locale.module:
In function locale_update_js_files(), Drupal adds a JavaScript file via drupal_add_js().
When the download method is set to "private" in admin/settings/file-system and the file system path is kept outside of the Documentroot (like suggested), the URL of the Javascript file will be set to its path on the local filesystem, thus making it inaccessible.
This seems to break some Opera version.
Serversoftware: Apache/2.2.3 (Debian) PHP/5.2.0-8+etch16
variable_get('locale_js_directory', 'languages')); returns "languages" (key not defined in variable table).
Comment | File | Size | Author |
---|
Comments
Comment #1
mafi-a CreditAttribution: mafi-a commentedsame problem here!
Comment #2
laszlo.laszlo CreditAttribution: laszlo.laszlo commentedI've same problem. The js url what the browser wants to download is: http://home/www/vhosts/laszlo.co.hu/files/languages/hu_76ae7fbe3973abfa5... This is not correct. Drupal 6.16 with private file download method.
Comment #3
arhak CreditAttribution: arhak commentedis not a bug, it is just not supported in D6 (will be supported in D7)
and it is a duplicated of a long list of issues previously requesting to address this #572516-2: make private download method support css/js aggregation, color module and js translations
on that issue you might find a core patch (aka core hack) which works around it, and might help you sort your private download issues
Comment #4
laszlo.laszlo CreditAttribution: laszlo.laszlo commentedI think because the Locale module is not a third party module and private download method is not third party too, it is a bug. I'm waiting the stable Drupal 7....
Thank you for your information.
Comment #5
arhak CreditAttribution: arhak commentedit is not a bug because documentation states a list of "features not being compatible with private download method" which includes those listed in the title of the referenced issue at #3
Comment #6
x3cion CreditAttribution: x3cion commentedHello,
I've fixed this bug of lazyness for me. (Though, I don't know if it would break public download (even if it shouldn't))
I took the time to read to everything to create a patch and made it.
Now this lousy attachment upload shouts errors in my face and won't do sh' in this beloved and holy browser.
If someone still needs this, I'll spend the time trying to upload it instead of writing another hate comment.
Edit: It automagically uploaded it anyway, even if it said something else. Anyway, the patch is against 6.20.
Comment #7
x3cion CreditAttribution: x3cion commentedAgainst 6.20.
Comment #8
lautaro.pastorini@gmail.com CreditAttribution: lautaro.pastorini@gmail.com commentedGreat! You are Right!
The real problem is that when we use private files, the files aren't served by the webserver directly (Apache in the most cases) , the files are served by drupal, then Drupal get the file from the private directory and serve the file to the user through a virtual path like "system/files/file_name.txt", if you try to access to system/files/file_name.txt from a browser the webserver will give you a 404 error.
That is the problem that affect to Locale module, because the module doesn't support private files. The patch provided by x3cion just fix that.
The patch change the way to retrive the JS files generated by locale, accessing to the file through Drupal when the site is configured to work with Private files, and serving files in traditional way when the site is configured with public files.
In my opinion I Agree that this is a BUG and need to be fixed, and if isn't a bug, is a nice contribution to the module, expanding his capabilities.
Thanks x3cion!!
Comment #9
askibinski CreditAttribution: askibinski commentedI believe the issue is also addressed here:
#250451: locale.module adds wrong js path
Comment #10
rolfo85 CreditAttribution: rolfo85 commentedHi,
I have also the same problem. I have Drupal 7 and the problem isn't more fixed !
I used the patch (locale-w-private-download.patch) but the content disappears.
Can you help me ?