Answers.Body: <p>It sounds like you're encountering <a href="https://issues.civicrm.org/jira/browse/CRM-17791" rel="nofollow noreferrer">CRM-17791</a>.  This bug was discovered and fixed in CiviCRM 4.7.  I would recommend upgrading a test copy of your site to 4.7 to see if that resolves the issue.  If so, consider upgrading or funding the long-term support team to backport a fix to version 4.6.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-12T13:16:51.840Z
Answers.Text: I finally got round to upgrading the site where I'm seeing this issue. I upgraded in two stages and tested both at version 4.6.25 and 4.7.15. The issue remains for me, although I can't repeat it on http://dmaster.demo.civicrm.org which reports as 4.7.16. Issue posted at https://issues.civicrm.org/jira/browse/CRM-19870
Answers.UserDisplayName: Graham
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-12T13:22:47.667Z
Answers.Text: Although on demo site we see other undesirable behaviour. check the issue for the details.
Answers.UserDisplayName: Graham
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-12T14:16:08.857Z
Answers.Text: @Graham - It sounds like you have a replicable bug then; I would file it on https://issues.civicrm.org.  That doesn't guarantee it will get fixed, of course, unless you also submit it to the paid issue queue (https://civicrm.org/paid-issue-queue), but it's a first step.
Answers.UserDisplayName: Jon G - Megaphone Tech
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-13T16:34:01.697Z
Answers.Text: My client has already paid to get one bug fixed. They won't be at all keen to fork out again as they are only a small organisation with a modest budget. The issue has been filed nonetheless, and I'll keep my fingers crossed that it gets fixed.
Answers.UserDisplayName: Graham
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-11-23T17:27:06.040Z
Answers.LastActivityDate: 2016-11-23T17:27:06.040Z
Answers.UserDisplayName: Jon G - Megaphone Tech
Answers.Body: <p>Looks like this was fixed here: <a href="https://github.com/civicrm/civicrm-core/commit/f3ceb1120bd50a5ac830ba405b3c6f72144480cb#diff-33ffa83cfb2fd90a56c6f258f36062a0" rel="nofollow noreferrer">https://github.com/civicrm/civicrm-core/commit/f3ceb1120bd50a5ac830ba405b3c6f72144480cb#diff-33ffa83cfb2fd90a56c6f258f36062a0</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-31T01:01:02.727Z
Answers.LastActivityDate: 2018-03-31T01:01:02.727Z
Answers.UserDisplayName: David Hayes
Body: <p>I have a Civi implementation that uses a custom activity type in which I have - amongst others - four custom fields of the field type "File".</p>
  
  <p>These custom fields work fine in all but one situation. If I view an activity record of this type the pop-up does not display the fields or the links to the files. If I force the activity view to display in a new browser window/tab then the following warnings get thrown up:</p>
  
  <blockquote>
  <pre><code>Warning: strtolower() expects parameter 1 to be string, array given in CRM_Core_DAO::getFieldValue() (line 1004 of /data/www/html/sites/all/modules/civicrm/CRM/Core/DAO.php).
  Warning: strtolower() expects parameter 1 to be string, array given in CRM_Core_DAO::getFieldValue() (line 1004 of /data/www/html/sites/all/modules/civicrm/CRM/Core/DAO.php).
  Warning: strtolower() expects parameter 1 to be string, array given in CRM_Core_DAO::getFieldValue() (line 1004 of /data/www/html/sites/all/modules/civicrm/CRM/Core/DAO.php).
  Warning: strtolower() expects parameter 1 to be string, array given in CRM_Core_DAO::getFieldValue() (line 1004 of /data/www/html/sites/all/modules/civicrm/CRM/Core/DAO.php).
  </code></pre>
  </blockquote>
  
  <p>My guess being that the four repeated PHP warnings relate to the four custom file fields, and give a clue as to why they aren't getting displayed in the activity view pop-up. The current workaround is to edit the activity record, where the four fields and the links to files are displayed.</p>
  
  <p>It would be really good to fix this. Any pointers most welcome.
  Currently using CiviCRM version 4.6.18 on Drupal 7.</p>
  
Tags: <custom-fields><files>
Title: How can I get custom file fields in an activity to display correctly?
ThreadText: # How can I get custom file fields in an activity to display correctly?
  
  (Asked by: username_0 on 2016-11-23)
  
  I have a Civi implementation that uses a custom activity type in which I have - amongst others - four custom fields of the field type "File".
  
  These custom fields work fine in all but one situation. If I view an activity record of this type the pop-up does not display the fields or the links to the files. If I force the activity view to display in a new browser window/tab then the following warnings get thrown up:
  
  > ```
  > Warning: strtolower() expects parameter 1 to be string, array given in CRM_Core_DAO::getFieldValue() (line 1004 of /data/www/html/sites/all/modules/civicrm/CRM/Core/DAO.php).
  > Warning: strtolower() expects parameter 1 to be string, array given in CRM_Core_DAO::getFieldValue() (line 1004 of /data/www/html/sites/all/modules/civicrm/CRM/Core/DAO.php).
  > Warning: strtolower() expects parameter 1 to be string, array given in CRM_Core_DAO::getFieldValue() (line 1004 of /data/www/html/sites/all/modules/civicrm/CRM/Core/DAO.php).
  > Warning: strtolower() expects parameter 1 to be string, array given in CRM_Core_DAO::getFieldValue() (line 1004 of /data/www/html/sites/all/modules/civicrm/CRM/Core/DAO.php).
  >
  > ```
  
  My guess being that the four repeated PHP warnings relate to the four custom file fields, and give a clue as to why they aren't getting displayed in the activity view pop-up. The current workaround is to edit the activity record, where the four fields and the links to files are displayed.
  
  It would be really good to fix this. Any pointers most welcome.
  Currently using CiviCRM version 4.6.18 on Drupal 7.
  
  **Tags:** custom-fields, files
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2016-11-23. Score: 4
  
  It sounds like you're encountering [CRM-17791](https://issues.civicrm.org/jira/browse/CRM-17791). This bug was discovered and fixed in CiviCRM 4.7. I would recommend upgrading a test copy of your site to 4.7 to see if that resolves the issue. If so, consider upgrading or funding the long-term support team to backport a fix to version 4.6.
  
  > **Comments:**
  > **username_0**: I finally got round to upgrading the site where I'm seeing this issue. I upgraded in two stages and tested both at version 4.6.25 and 4.7.15. The issue remains for me, although I can't repeat it on http://dmaster.demo.civicrm.org which reports as 4.7.16. Issue posted at https://issues.civicrm.org/jira/browse/CRM-19870  
  > **username_0**: Although on demo site we see other undesirable behaviour. check the issue for the details.  
  > **username_1**: @username_0 - It sounds like you have a replicable bug then; I would file it on https://issues.civicrm.org.  That doesn't guarantee it will get fixed, of course, unless you also submit it to the paid issue queue (https://civicrm.org/paid-issue-queue), but it's a first step.  
  > **username_0**: My client has already paid to get one bug fixed. They won't be at all keen to fork out again as they are only a small organisation with a modest budget. The issue has been filed nonetheless, and I'll keep my fingers crossed that it gets fixed.  
  
  ---
  
  ### Answer by username_2 on 2018-03-31. Score: 0
  
  Looks like this was fixed here: <https://github.com/civicrm/civicrm-core/commit/f3ceb1120bd50a5ac830ba405b3c6f72144480cb#diff-33ffa83cfb2fd90a56c6f258f36062a0>
  
  
  ---
  
  