Hello,
I don't think is a permission related. We are using suphp on our server, so script are runned under same account ad whole home dir is. And the ajax version works fine.
But here is, what we find, mabye it helps you:
The situation:
Form created in CRED has only two file filse created with shortcode:
[cred_field field='extended-abstract' post='paper' value='' urlparam='']
Ajax submission in Other setting is unxhecked (but it does not matter)
The is function added to functions.php that disables ajax upload:
add_filter("cred_file_upload_disable_progress_bar", "disable_progress_bar");
function disable_progress_bar($val) {
return true;
}
And here is the point. When function is removed and upload works works with Ajax, there is hidden input field cerated with file input:
<input type="hidden" id="wpcf-extended-abstract_hidden" name="wpcf-extended-abstract" value="" class="js-wpv-credfile-hidden wpt-form-hidden form-hidden" data-wpt-type="file" disabled="disabled" data-wpt-id="cred_form_369_1_wpcf-extended-abstract_hidden" data-wpt-name="wpcf-extended-abstract">
When file is selected, its uploaded to server and when its done, the files url (whole URL) is added as value to this field.
<input type="hidden" id="wpcf-extended-abstract_hidden" name="wpcf-extended-abstract" value="hidden link" class="js-wpv-credfile-hidden wpt-form-hidden form-hidden" data-wpt-type="file" data-wpt-id="cred_form_369_1_wpcf-extended-abstract_hidden" data-wpt-name="wpcf-extended-abstract">
If I finaly submit form, file is added to post sucesfully.
But when I disable Ajax, same field has been created, again with empty value. But when I select file, no ajax has been runned so the field remains empty. When I submit the form, it reloads the same page but with error "Please enter a valid URL address pointing to the file."
The hidden field now looks like this:
<input type="hidden" id="wpcf-extended-abstract_hidden" name="wpcf-extended-abstract" value="filename.jpg" class="js-wpv-credfile-hidden wpt-form-hidden form-hidden" data-wpt-type="file" data-wpt-id="cred_form_369_1_wpcf-extended-abstract_hidden" data-wpt-name="wpcf-extended-abstract">
You can see its value changed to file name, but when I try to submit form, it returns same error again. But when I edit the value in browsers developer tool and add the whole url in it and not just file name, form can be submitted successfully.
The last thing what I found is the javascript error in console, which goes form validation. When form is showed (firstly, before any submission), I click on file input to select file and after it, when I blur the input, this has been added to console in browser:
Uncaught TypeError: Cannot read property 'call' of undefined
at $.validator.check (jquery.validate.js?ver=0.1.2:528)
at $.validator.element (jquery.validate.js?ver=0.1.2:349)
at $.validator.onfocusout (jquery.validate.js?ver=0.1.2:232)
at a.fn.init.delegate (jquery.validate.js?ver=0.1.2:313)
at HTMLFormElement.<anonymous> (jquery.validate.js?ver=0.1.2:1152)
at HTMLFormElement.dispatch (jquery.js?ver=1.12.4:3)
at HTMLFormElement.r.handle (jquery.js?ver=1.12.4:3)
at Object.trigger (jquery.js?ver=1.12.4:3)
at Object.a.event.trigger (jquery-migrate.min.js?ver=1.4.1:2)
at Object.simulate (jquery.js?ver=1.12.4:3)
Thanks