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).

CommentFileSizeAuthor
#6 locale-w-private-download.patch1.23 KBx3cion
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mafi-a’s picture

same problem here!

laszlo.laszlo’s picture

Version: 6.15 » 6.16

I'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.

arhak’s picture

Category: bug » support
Status: Active » Closed (duplicate)

is 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

laszlo.laszlo’s picture

I 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.

arhak’s picture

it 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

x3cion’s picture

Hello,

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.

x3cion’s picture

Version: 6.16 » 6.20

Against 6.20.

lautaro.pastorini@gmail.com’s picture

Status: Closed (duplicate) » Closed (fixed)
Issue tags: +locale 404 solution

Great! 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!!

askibinski’s picture

I believe the issue is also addressed here:
#250451: locale.module adds wrong js path

rolfo85’s picture

Hi,

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 ?