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) »
  • After upgrade from 3.1.1 to 3.3.6, custom 'file' fields cannot find images 'eid'
Pages: [1]

Author Topic: After upgrade from 3.1.1 to 3.3.6, custom 'file' fields cannot find images 'eid'  (Read 1160 times)

CiviTeacher.com

  • I live on this forum
  • *****
  • Posts: 1282
  • Karma: 118
    • CiviTeacher
  • CiviCRM version: 3.4 - 4.5
  • CMS version: Drupal 6&7, Wordpress
  • MySQL version: 5.1 - 5.5
  • PHP version: 5.2 - 5.4
After upgrade from 3.1.1 to 3.3.6, custom 'file' fields cannot find images 'eid'
June 21, 2011, 06:21:13 pm
I have a custom photo "file" field in a CiviCRM 3.1.1 installation that was recently successfully upgraded to CiviCRM 3.3.6.  Afterwards, none of the images stored in custom-data-fields and displayed in profiles are showing up.

I checked the log files, and it can't find a valid "eid" ... where do I look to fix this:
Code: [Select]
Jun 22 00:52:58  [info] $Fatal Error Details = Array
(
    [message] => Could not find valid value for eid
    [code] =>
)


Jun 22 00:52:58  [info] $backTrace = /home/paba/paba_newer/sites/all/modules/civicrm/CRM/Core/Error.php, backtrace, 277
/home/paba/paba_newer/sites/all/modules/civicrm/CRM/Utils/Request.php, fatal, 109
/home/paba/paba_newer/sites/all/modules/civicrm/CRM/Core/Page/File.php, retrieve, 47
/home/paba/paba_newer/sites/all/modules/civicrm/CRM/Core/Invoke.php, run, 219
/home/paba/paba_newer/sites/all/modules/civicrm/drupal/civicrm.module, invoke, 355
, civicrm_invoke,
/home/paba/paba_newer/includes/menu.inc, call_user_func_array, 348
/home/paba/paba_newer/index.php, menu_execute_active_handler, 18


We have hundreds of these custom-data-field images that appear to be stored in: 
Code: [Select]
<root>/sites/default/files/civicrm/custom

I have tried settings sites/default/files to chmod 777 with no result.

CiviCRM is trying to show these images through a link like this, to be accessed through a javascript:
Code: [Select]
www.mysite.com/civicrm/file?reset=1&id=372&eid=48Accessing the images via a link like this above gives a "could not retrieve the file" error.

Accessing the file directly like this works:
Code: [Select]
www.mysite.com/sites/default/files/civicrm/custom/yvonne2_small_50185c921c6fa626aaad5e3703e335c8.jpg

How do I repair all these broken image links and fix the 'eid'?

UPDATE it should be noted that creating new data and uploading a new image via the profile works.  The image appears.  But old images in existence before the upgrade the data has been misplaced.
« Last Edit: June 21, 2011, 06:43:47 pm by Stoob »
Try CiviTeacher: the online video tutorial CiviCRM learning library.

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: After upgrade from 3.1.1 to 3.3.6, custom 'file' fields cannot find images 'eid'
June 22, 2011, 02:28:37 am
Can you poke around in the civicrm_file table and see if you can find the ID of an image? The form

civicrm/file?reset=1&id=372&eid=48

is right I think. Perhaps you can determine the correct values and then begin to see what happened.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

CiviTeacher.com

  • I live on this forum
  • *****
  • Posts: 1282
  • Karma: 118
    • CiviTeacher
  • CiviCRM version: 3.4 - 4.5
  • CMS version: Drupal 6&7, Wordpress
  • MySQL version: 5.1 - 5.5
  • PHP version: 5.2 - 5.4
Re: After upgrade from 3.1.1 to 3.3.6, custom 'file' fields cannot find images 'eid'
June 22, 2011, 11:04:10 am
The data in the db was fine, but my testing uploading new files showed that CiviCRM was not recognizing the Custom Files path at <root>/civicrm/admin/setting/path&reset=1 and just shoving every new file in the <root> directory

So I NULL db table civicrm_domain, field config_backend and reloaded a page.  This rebuilt the paths to the image uploads and now everything works again.

thanks for the help.

Try CiviTeacher: the online video tutorial CiviCRM learning library.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • After upgrade from 3.1.1 to 3.3.6, custom 'file' fields cannot find images 'eid'

This forum was archived on 2017-11-26.