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. The steps to reproduce are:
- Go to Administer > Custom Data and Screens > Custom Fields in CiviCRM
- Create a new set of Custom Fields or edit an existing one to use the style "Tab" and apply to Contacts (I used "Individual")
- Place as many fields as you want in the Custom Field Set, including at least one File field
- Find a Contact
- Open the Tab of the Custom Field Set you created
- Click the "Edit ..." button to change the values
- Make changes to any (or several) field and click "Save"
- You will be taken back to the Contact but your changes will not appear
Update Feb. 8 - I applied the diff from CRM-17949 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, 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:
- Follow steps 1 through 6 in the previous numbered list
- Upload an file (I used an image) into the file field and click "Save"
- You will be taken back to the contact but the file will not be saved
- Return to the Custom Fields, and click "more" > "Settings"
- Change the Display Type to Inline
- Return to the contact and scroll down to the group. Click "Edit"
- Choose a file for the file field, and click "Save"
- The image will be shown in the group
- Return to Custom Fields again, and change the Display Type back to Tab
- Return to the same contact and click on the tab for your custom group
- 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."