Answers.Body: <p>A work around is to create the record without the upload and then edit. The upload works fine after that.</p>
  
  <p>4.7.13 and Drupal</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-11-22T16:39:42.663Z
Answers.LastActivityDate: 2017-12-05T21:43:22.687Z
Answers.LastEditDate: 2017-12-05T21:43:22.687Z
Answers.UserDisplayName: Rdarris
Body: <p>I have a site with several custom field sets that use the "Tab" style for displaying information about a contact. Included in one field set is a "File" field that is used to store a profile image for the contact.</p>
  
  <p>After upgrading to 4.7.0, attempting to view this tab for a contact with a profile image results in an error message that says the value (the filename of the image) is not an Integer. For contacts that don't have an image, the tab is shown, but the file cannot be changed. The edit popover closes when I click "Save" but the file is not updated.</p>
  
  <p>I replicated this issue using the <a href="http://wpmaster.demo.civicrm.org/" rel="nofollow">CiviCRM demo site</a>. The steps to reproduce are:</p>
  
  <ol>
  <li>Go to Administer > Custom Data and Screens > Custom Fields in CiviCRM</li>
  <li>Create a new set of Custom Fields or edit an existing one to use the style "Tab" and apply to Contacts (I used "Individual")</li>
  <li>Place as many fields as you want in the Custom Field Set, including at least one File field</li>
  <li>Find a Contact</li>
  <li>Open the Tab of the Custom Field Set you created</li>
  <li>Click the "Edit ..." button to change the values</li>
  <li>Make changes to any (or several) field and click "Save"</li>
  <li>You will be taken back to the Contact but your changes will not appear</li>
  </ol>
  
  <hr>
  
  <p><strong>Update Feb. 8</strong> -
  I applied the diff from <a href="https://github.com/jitendrapurohit/civicrm-core/commit/5024760cb7e50846f638330cd95974b22dfd6cee" rel="nofollow">CRM-17949</a> and while it does allow changing other fields in a Tab, images still cannot be changed. Also, the error message on existing images still appears. I attempted to replicate this on the <a href="http://wpmaster.demo.civicrm.org/" rel="nofollow">demo site</a>, which is currently running CiviCRM 4.7.2, but it appears to have file system permission issues that prevent uploading files.</p>
  
  <hr>
  
  <p><strong>Update Feb. 10</strong> -
  Here is how to reproduce this issues in 4.7.2:</p>
  
  <ol>
  <li>Follow steps 1 through 6 in the previous numbered list</li>
  <li>Upload an file (I used an image) into the file field and click "Save"</li>
  <li>You will be taken back to the contact but the file will not be saved</li>
  <li>Return to the Custom Fields, and click "more" > "Settings"</li>
  <li>Change the Display Type to Inline</li>
  <li>Return to the contact and scroll down to the group. Click "Edit"</li>
  <li>Choose a file for the file field, and click "Save"</li>
  <li>The image will be shown in the group</li>
  <li>Return to Custom Fields again, and change the Display Type back to Tab</li>
  <li>Return to the same contact and click on the tab for your custom group</li>
  <li>You will be shown a popover message "One of parameters (value: filename.jpg) is not of the type Integer" and the tab body will display "Sorry but we are not able to provide this at the moment."</li>
  </ol>
  
Tags: <wordpress><contacts><custom-fields><4.7>
Title: Custom Field Groups with File fields cannot be edited as a Tab
ThreadText: # Custom Field Groups with File fields cannot be edited as a Tab
  
  (Asked by: username_0 on 2016-02-02)
  
  I have a site with several custom field sets that use the "Tab" style for displaying information about a contact. Included in one field set is a "File" field that is used to store a profile image for the contact.
  
  After upgrading to 4.7.0, attempting to view this tab for a contact with a profile image results in an error message that says the value (the filename of the image) is not an Integer. For contacts that don't have an image, the tab is shown, but the file cannot be changed. The edit popover closes when I click "Save" but the file is not updated.
  
  I replicated this issue using the [CiviCRM demo site](http://wpmaster.demo.civicrm.org/). The steps to reproduce are:
  
  1. Go to Administer > Custom Data and Screens > Custom Fields in CiviCRM
  2. Create a new set of Custom Fields or edit an existing one to use the style "Tab" and apply to Contacts (I used "Individual")
  3. Place as many fields as you want in the Custom Field Set, including at least one File field
  4. Find a Contact
  5. Open the Tab of the Custom Field Set you created
  6. Click the "Edit ..." button to change the values
  7. Make changes to any (or several) field and click "Save"
  8. You will be taken back to the Contact but your changes will not appear
  
  ---
  
  **Update Feb. 8** -
  I applied the diff from [CRM-17949](https://github.com/jitendrapurohit/civicrm-core/commit/5024760cb7e50846f638330cd95974b22dfd6cee) and while it does allow changing other fields in a Tab, images still cannot be changed. Also, the error message on existing images still appears. I attempted to replicate this on the [demo site](http://wpmaster.demo.civicrm.org/), which is currently running CiviCRM 4.7.2, but it appears to have file system permission issues that prevent uploading files.
  
  ---
  
  **Update Feb. 10** -
  Here is how to reproduce this issues in 4.7.2:
  
  1. Follow steps 1 through 6 in the previous numbered list
  2. Upload an file (I used an image) into the file field and click "Save"
  3. You will be taken back to the contact but the file will not be saved
  4. Return to the Custom Fields, and click "more" > "Settings"
  5. Change the Display Type to Inline
  6. Return to the contact and scroll down to the group. Click "Edit"
  7. Choose a file for the file field, and click "Save"
  8. The image will be shown in the group
  9. Return to Custom Fields again, and change the Display Type back to Tab
  10. Return to the same contact and click on the tab for your custom group
  11. You will be shown a popover message "One of parameters (value: filename.jpg) is not of the type Integer" and the tab body will display "Sorry but we are not able to provide this at the moment."
  
  **Tags:** wordpress, contacts, custom-fields, 4.7
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-11-22. Score: 1
  
  A work around is to create the record without the upload and then edit. The upload works fine after that.
  
  4.7.13 and Drupal
  
  
  ---
  
  