3

I have created some custom file fields so I can add some files (pdf, doc, zip etc) to each user profile.

When I upload the files, everything works great. I the backend the file names are displayed correclty, BUT in the frontent the filenames are changed: a string like "_8b9c34bb85a1219b9e1f60e02d82907c" is atteched.

How can I fix this? I use civicrm 4.6.11 and wordpress 3.8

UPDATE 5/4/2016: I have tested version 4.6.14 and 4.7.4 on wordpress 4.4.2 (latest version) on different Plesk (TopHost) and Cpanel (SiteGround) shared servers.

The problem remain the same.

The files are stored correctly but at the frontend an HTML text on the link is added.

See Screenshots:

user profile custom fields backend user profile custom fields backend

user profile custom fields frontend user profile custom fields frontend

backend civicrm 4.6.14 backend civicrm 4.6.14

frontend profile page civicrm 4.6.14 wordpress 4.4.2 frontend profile page civicrm 4.6.14

server settings server settings

2
  • I have updated, CiviCRM to 4.7.4 and php to 5.5 but the promlem remains. When I upload a file, the string like "_c48647e27e457b3bb7237a9597d6852f" is attached to the name. Any workarounds? maybe it its a mysql problem?
    – Qara Ndi
    Mar 30, 2016 at 14:39
  • I always assumed this was on purpose, that on the front-end civi added characters to uploaded files as part of a security measure. If you want to reference the file, you can use the API or token/variables.
    – RayWright
    Dec 29, 2017 at 12:53

3 Answers 3

1

Please make sure you have selected the correct datatype while creating the custom field value - it should look like below

enter image description here

7
  • The properties are exactly as the screenshot that you posted, so no, this does not solves the problem. Any other hints?
    – Qara Ndi
    Feb 3, 2016 at 8:43
  • hi I managed to test the same against Civicrm 4.6.11 version and wordpress 4.4.2 - which worked perfectly. So please try to upgrade the civicrm version and give a try. please don't upgrade to civicrm version 4.7 where we have some issue in custom field so its better to test with v4.6.11 Feb 3, 2016 at 12:36
  • I am already using v4.6.11, but an older version of wordpress. (3.8) I cannot upgrade wordpress because My theme does not support a greater version. Is there any fix for this?
    – Qara Ndi
    Feb 5, 2016 at 12:21
  • If that is the case you need to try fixing your theme Feb 10, 2016 at 9:21
  • Hello, I have updated, CiviCRM to 4.7.4 and php to 5.5 but the promlem remains. When I upload a file, the string like "_c48647e27e457b3bb7237a9597d6852f" is attached to the name. Any workarounds? maybe it its a mysql problem?
    – Qara Ndi
    Mar 30, 2016 at 14:20
0

I did manage to test the same against Civicrm 4.6.14 and custom field of type file is not working as excepted but still the file is been saved against the field but the display is incorrect

this is how it looks - in the display

enter image description here

if you try to edit the custom file is been displayed as below

enter image description here

So please check your installation - and then try again - thanks

1
  • Yes. on the backend of civicrm the filename is correct. But on the frontend (eg. the profile page of the user) the filename is damaged. see screenshots here: wordpress backend i.imgur.com/RiIfMGy.png frontend: i.imgur.com/CeSqHbz.png
    – Qara Ndi
    Apr 1, 2016 at 11:23
0

I'm pretty sure the problem you're describing is CRM-18183. Try upgrading to CiviCRM 4.7.5+.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.