Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Fixed/Completed
-
Affects Version/s: 3.2.4
-
Fix Version/s: 3.2.6
-
Component/s: Core CiviCRM
-
Labels:None
Description
When using CiviCRM in a localized environment where the language is indicated by the suffix to the URL, it is impossible to add an image to the contact profile, because the ImageURL is saved with the language suffix, i.e. /es and this causes a 404 error, as the program can't access the image with the language suffix.
I fixed this problem for my installation by adding:
$relativePath = str_replace('/es/', '/',$relativePath);
to the end of the getRelativePath function in CRM/Contact/BAO/Contact.php (aprox line 768).
This is obviously an unsatisfactory hack, as it only works for Spanish.
I don't know if a better fix would be to leave the suffix intact here and correct the referencing of the image location to ignore the language suffix.
Thanks for the help as always!