I am trying to let a user with a custom role called "supervisor" to upload a file via a CRED form. I expect the image file to be uploaded correctly and then displayed on the form. Instead the user is getting an error message "An error occurred in the upload. Please try again later."
This had been working just fine, but for some reason it started giving this error message recently. It's unclear how recently the errors started as the user just recently informed me.
I have tried doing the upload as an admin and it works just fine. This made me think the problem was with access rights. I investigated the supervisor's media access rights in Access. Everything there is checked. Do I also need to make sure any special capabilities are enabled in the custom role for "Supervisor"?
Link to a page where the issue can be seen: This cannot be seen without logging into the site as a supervisor. I can give you the login credentials if needed.
Hello,
The problem you mentioned above is abnormal, please check these:
1) In case it is a compatibility problem, please deactivate all other plugins, and switch to wordpress default theme 2019, and test again
2) Also check if there is any PHP/JS error in your website:
https://toolset.com/documentation/programmer-reference/debugging-sites-built-with-toolset/
3) If the problem still persists, please provide database dump file(ZIP file) of your website, also point out the problem page URL and form URL, I need to test and debug it in my localhost, thanks
https://toolset.com/faq/provide-supporters-copy-site/
Thanks for the details, I can import your database dump file into my localhost, but there isn't similar problem in my localhost, see screenshot media1.JPG and media2.JPG
So it should be a compatibility/server problem in your website, did you get any PHP debug logs?
See my first answer above:
https://toolset.com/forums/topic/error-when-user-uploads-file-to-media-library/#post-1338309
2) Also check if there is any PHP/JS error in your website:
https://toolset.com/documentation/programmer-reference/debugging-sites-built-with-toolset/
I did not get any php errors. Error log is available at this link. hidden link
I also did not get any console errors as you can see in the attached image.
I'm stumped as I can change the user to admin role and it works fine. Change it back to supervisor and I get the error message after uploading the image.
I'm happy to provide ftp credentials if that's helpful.
OK, please backup your website, then provide credentials and FTP access in below private message box, thanks
Yes, I did try with user "supervisor" in my localhost using your database dump file, it works fine in my localhost.
I can log into your website, will update here if there is anything found.
Here are what I found in your website:
After I switch theme from "GeneratePress Child" to it's parent theme "GeneratePress"
it works fine, can you test again?
Since there are lots of custom codes in the child theme "GeneratePress Child", there should be some problem in those custom codes.
Thanks. I'll investigate my child theme and functions.php to see what might be impacting this.