Perch Form file upload works but can't be downloaded
I have a client who was still ticking over on Perch 2.8.34 without any issues. However, it now seems that the Perch Form for their careers applications isn't quite working as it used to after they moved host from Vidahost to Tsohost (same company who merged the two together). I noticed that the root path was incorrect after the merge so the file upload wasn't working, so I fixed that - along with the permissions on the upload folder outside the website - and files now upload and submit fine. However, when viewing a response in the Admin panel of the Perch Form, the file is shown correctly (I've even checked the upload folder for the form, and they are getting uploaded fine) but the link for the file doesn't download anything? It's going to here with unique IDs for each entry: /perch/addons/apps/perch_forms/responses/detail/?id=2327&file=application_form but it's just refreshing the page and not downloading any files – any idea what's going wrong?
This is what I'm using in my template:
<perch:input type="file" id="application_form" label="Application Form or CV" accept="pdf text richtext office" required="true" />
Debug in Perch Admin on a form response before clicking file link:
Debug Message  SELECT u.*, r.* FROM perch2_users u, perch2_user_roles r WHERE u.roleID=r.roleID AND u.userEnabled=1 AND u.userID=1 AND u.userHash='9db1cfbd594cf57e1ac3914257c84f0a' LIMIT 1 UPDATE perch2_users SET userHash='7763ca89b9c77a99533a24a811c87a68' WHERE userID='1'  SELECT p.privKey FROM perch2_user_privileges p  SELECT * FROM (SELECT DISTINCT settingID, settingValue, userID FROM perch2_settings WHERE userID=1 OR userID=0 ORDER BY userID DESC) AS settings GROUP BY settingID, settingValue, userID  SELECT * FROM perch2_forms_responses WHERE responseID='2327' LIMIT 1 Queries: 6 Memory: 1.8855
Debug in Perch Admin on a form response after clicking file link:
ebug Message  SELECT u.*, r.* FROM perch2_users u, perch2_user_roles r WHERE u.roleID=r.roleID AND u.userEnabled=1 AND u.userID=1 AND u.userHash='4e8bc2bbe9a2e7d6c2722e93d7c691fe' LIMIT 1 UPDATE perch2_users SET userHash='c460e4eb1362185e635d8692399eac5d' WHERE userID='1'  SELECT p.privKey FROM perch2_user_privileges p  SELECT * FROM (SELECT DISTINCT settingID, settingValue, userID FROM perch2_settings WHERE userID=1 OR userID=0 ORDER BY userID DESC) AS settings GROUP BY settingID, settingValue, userID  SELECT * FROM perch2_forms_responses WHERE responseID='2327' LIMIT 1 Queries: 6 Memory: 1.8877 Array ( [type] => 8 [message] => Trying to get property of non-object [file] => /var/sites/c/carelinelifestyles.co.uk/public_html/perch/addons/apps/perch_forms/modes/response.detail.pre.php [line] => 20 )
SUMMARY INFORMATION Perch: 2.8.34, PHP: 7.1.5, MySQL: mysqlnd 5.0.12-dev - 20150407 - $Id: b396954eeb2d1d9ed7902b8bae237b287f21ad9e $, with PDO Server OS: Linux, cgi-fcgi Installed apps: content (2.8.34), assets (2.8.34), categories (2.8.34), perch_blog (4.6), perch_events (1.9.2), perch_forms (1.8.2) App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_blog', 'perch_events', 'perch_forms', ); PERCH_LOGINPATH: /perch PERCH_PATH: /var/sites/c/carelinelifestyles.co.uk/public_html/perch PERCH_CORE: /var/sites/c/carelinelifestyles.co.uk/public_html/perch/core PERCH_RESFILEPATH: /var/sites/c/carelinelifestyles.co.uk/public_html/perch/resources Image manipulation: GD PHP limits: Max upload 100M, Max POST 100M, Memory: 128M, Total max file upload: 100M F1: 6a33f95eca3667f9e0c39bf5ca2980fe Resource folder writeable: Yes DOCUMENT_ROOT: /var/sites/c/carelinelifestyles.co.uk/public_html HTTP_HOST: carelinelifestyles.co.uk REQUEST_URI: /perch/core/settings/diagnostics/ SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
It looks like it could be the same issue here. Has there been a fix for this?