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 »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • How to update value in image_url from contact table while moving site
Pages: [1]

Author Topic: How to update value in image_url from contact table while moving site  (Read 823 times)

shashikant

  • I post occasionally
  • **
  • Posts: 30
  • Karma: 0
  • CiviCRM version: civicrm 4.1.3
  • CMS version: Drupal 6.26
  • MySQL version: Mysql 5.1.56
  • PHP version: PHP Version 5.3.6
How to update value in image_url from contact table while moving site
May 22, 2013, 04:05:42 am
Hi,
I have migrated the civicrm DB from one site to another.
and upgraded the civicrm.

The problem is that i have contacts with profile image.
I also noticed that when a image is uploaded for contact it does not create any entry in table civicrm_file it only creates image_url entry in civicrm_contact table.
So many contacts are having entry like <oldsite>/sites/files/civicrm/custom/image.jpg
Images are also copied to new server. But it is refering to old server file path.

How to solve this problem. Is there any step which i missed during moving/upgrading civicrm ?

Or should i update the contact table for column image_url from <oldsite>/sites/files/civicrm/custom/image.jpg to <newsite>/sites/files/civicrm/custom/image.jpg using sql queries.

Thanks

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: How to update value in image_url from contact table while moving site
May 22, 2013, 12:41:25 pm
We do not handle this very well - we are storing an URL rather than a file pointer in that contact field.
AFAIK the only fix is to issue an UPDATE query on your database to do some string replacement on those urls.
Try asking your question on the new CiviCRM help site.

shashikant

  • I post occasionally
  • **
  • Posts: 30
  • Karma: 0
  • CiviCRM version: civicrm 4.1.3
  • CMS version: Drupal 6.26
  • MySQL version: Mysql 5.1.56
  • PHP version: PHP Version 5.3.6
Re: How to update value in image_url from contact table while moving site
May 22, 2013, 09:25:52 pm
Thanks Coleman.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • How to update value in image_url from contact table while moving site

This forum was archived on 2017-11-26.