CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Links to images, localization, CiviCRM 3.3.2 and Drupal 6.20
Pages: [1]

Author Topic: Links to images, localization, CiviCRM 3.3.2 and Drupal 6.20  (Read 855 times)

DanilaD

  • I post occasionally
  • **
  • Posts: 93
  • Karma: 11
Links to images, localization, CiviCRM 3.3.2 and Drupal 6.20
January 08, 2011, 04:49:39 am
Hello.

Long time ago (more than a year), on my Drupal site, I had languages differentiation done by the path, and a default language was English. So, going to mysite.com/en/ and going to mysite.com/ gave the same page. Later I changed default language to Russian, so now going to mysite.com/ru/ and going to mysite.com gave the same pages.

CiviCRM was using the following path to the contact images: mysite.com/ru/sites/default/files/civicrm/custom/image.jpg, and the images were loading correctly. After I upgraded to 3.3.2 from 3.2.5 (and upgraded Drupal from 6.19 to 6.20), the images became not accessible at mysite.com/ru/sites/default/files/civicrm/custom/image.jpg, but accessible at mysite.com/sites/default/files/civicrm/custom/image.jpg.

I've checked different locations for changing the front part of URL (mysite.com/ru), but it was set up correctly (to mysite.com/) in mysite.com/civicrm/admin/setting/updateConfigBackend&reset=1. However, all the links in CiviCRM were like mysite.com/ru/civicrm/admin/setting/updateConfigBackend&reset=1

Finally, I solved this through .htaccess: I've added a line
Code: [Select]
RewriteRule ^ru/(sites/default/files/civicrm/)(.*)$ http://mysite.com/$1$2 [R,L]

that changes the path to images, and finally they've appeared. But I think there should be a way to tell CiviCRM to use mysite.com/ not mysite.com/ru as the beginning of all links?

My civicrm.settings.php states:
Code: [Select]
define( 'CIVICRM_UF_BASEURL'      , 'http://mysite.com/' );

Regards,
Danila
« Last Edit: January 10, 2011, 06:06:44 am by DanilaD »

Piotr Szotkowski

  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Links to images, localization, CiviCRM 3.3.2 and Drupal 6.20
January 10, 2011, 04:36:46 am
Quote from: DanilaD on January 08, 2011, 04:49:39 am
CiviCRM was using the following path to the contact images: mysite.com/ru/sites/default/files/civicrm/custom/image.jpg, and the images were loading correctly.

Hm. Assuming there actually isn’t a ru directory on the server, this means something must’ve been rewriting queries and dropping the ru; I assume the example image path in the filesystem actually mysite.com/sites/default/files/civicrm/custom/image.jpg, isn’t it?

Quote
I've checked different locations for changing the front part of URL (mysite.com/ru), but it was set up correctly (to mysite.com/ru) in mysite.com/civicrm/admin/setting/updateConfigBackend&reset=1. However, all the links in CiviCRM were like mysite.com/ru/civicrm/admin/setting/updateConfigBackend&reset=1

Can you try dropping the ru in that screen (and disabling the .htaccess rewriting)? It would make the most sense to me…
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

DanilaD

  • I post occasionally
  • **
  • Posts: 93
  • Karma: 11
Re: Links to images, localization, CiviCRM 3.3.2 and Drupal 6.20
January 10, 2011, 06:06:17 am
My misprint, the original post should be "but it was set up correctly (to mysite.com/)".

ru/ part was a correct one long time ago when English was the default language on site.

Yes, the correct path to image is mysite.com/sites/default/files/civicrm/custom/image.jpg.

Regards,
Danila

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Links to images, localization, CiviCRM 3.3.2 and Drupal 6.20

This forum was archived on 2017-11-26.