when I use translation (module locale) together with the user ralation ship module, the path to the gif is corrupted because of the "fr" or "en" that is inserted at the end of the USER_RELATIONSHIPS_UI_PATH definition

Comments

alex.k’s picture

Assigned: Unassigned » darren.ferguson

Darren, could you take a look at this? We have come across this issue not long ago. Thanks.

mrf’s picture

Issue tags: +i18n

Closed #825296: Page not found for loadingAnimation.gif as duplicate of this issue.

mrf’s picture

Version: 6.x-1.0-rc3 » 7.x-1.x-dev
Assigned: darren.ferguson » Unassigned
Status: Active » Needs review
Issue tags: -i18n
StatusFileSize
new1.2 KB

Committed to 6.x-dev. This is missing from 7.x as well patch attached.

berdir’s picture

Won't this break just the same if the default language does have a language prefix as well?

fietserwin’s picture

Status: Needs review » Needs work

It looks like this issue is related to core issue #1196606: url()/locale_language_url_rewrite_url(): language prefix should not be added to URL's pointing to existing resources. That issue is still about finding out if we think that the url() function should be able to handle paths to existing resources, or that only file_create_url() should be used for that.

Workaround if you want to use url(): pass in a language object that has an empty prefix property:

global $language;
$url_options['language'] = clone $language;
$url_options['language']->prefix = '';
$url = url($path, $url_options)

EDIT: and yes, berdir is right. The proposed patch above won't work if the default language also has prefix.