When using Toolset post forms frontend to publish a custom post i get the error "You cannot upload a file of this type". However, the featured image upload works fine.
If i use WPForms to make the custom post submission, it works fine both with featured image and file upload.
But when i then try to edit the post frontend afterwards, using Toolset post form edit, the errors still occur.
I tried disabling Really Simple SSL, disabling Wordfence and changing theme. Still same problem. There are no .htaccess Prevent PHP Execution in the uploads folder.
Regards
Hi,
Thank you for contacting us and I'd be happy to assist.
Are you getting this error while trying to upload any file or is it happening only for files of any particular extension or size?
Please also see if any other error or warning is generated in the server's error log when the form submission fails.
( you can temporarily enable WordPress debugging before this test: https://wordpress.org/support/article/debugging-in-wordpress/ )
Lastly, also see if the website includes any custom code that limits the use of any particular file type or size, for the Toolset Forms.
I hope this helps and let me know how it goes.
regards,
Waqar
Images work in the post form for both the featured image, and also the file upload.
No other files than image files work in the file upload.
When the post is published and i want to edit the post frontend afterwards, it is not possible to use the edit form and submit the edit form unless i upload a new featured image even though the image preview works fine and the image is uploaded. I then have to reupload a featured image even though there already is an featured image. But still, the file upload for documents also doesn't work in the edit post form - Error: "You cannot upload a file of this type".
If i try submitting the edit post form frontend with the already uploaded image, it says: "You can only upload an image file"
Debugging is enabled and it generates alot of errors when trying to submit post form or submitting edit post form.
Thank you for sharing these details.
I've performed some tests on my website, but couldn't reproduce this behavior. It looks like something specific to your website or server is involved.
To troubleshoot this, I'll need to see exactly how this form is set up in the admin area. Can you please share the temporary admin login details, along with the link to the page where this edit form can be seen? I'll also need your permission to download the clone/snapshot of the website, in case it needs to be investigated on a different server.
Note: Your next reply will be private and making a complete backup copy is recommended before sharing the access details.
Thank you for waiting.
During troubleshooting, I noticed that a form named "Jobsi.dk jobagent" from WPforms has been included in the popup.
If that form's shortcode is removed from that popup, the file upload field in the Toolset Form starts working correctly.
To avoid this conflict, you can replace that form in the popup with a Toolset Form too.