I am trying to: Upload an image via CRED.
It works if I am logged into WordPress, but not for guests. The error happens when I select an image to send, even if I have not submitted the form.
I am not using the Access plugin.
Link to a page where the issue can be seen: hidden link
I expected to see: The file being uploaded
Instead, I got: Error message stating "The form you submitted has expired. Please refresh the page and try again."
Hi, can you try the following troubleshooting steps?
- Temporarily activate a default theme like Twenty Seventeen and test the form again. Let me know the results.
- Create a Generate Press child theme and insert this code in the functions.php file, then test the form again and let me know the results:
add_filter("cred_file_upload_disable_progress_bar", "disable_progress_bar");
function disable_progress_bar($val) {
return true;
}
- Turn on server logs to learn more about the error if it's available. If you're not familiar with server logs, I can show you how to activate them. Go in your wp-config.php file and look for define(‘WP_DEBUG’, false);. Change it to:
define('WP_DEBUG', true);
Then add these lines, just before it says 'stop editing here':
ini_set('log_errors',TRUE);
ini_set('error_reporting', E_ALL);
ini_set('error_log', dirname(__FILE__) . '/error_log.txt');
Try to upload another image and reproduce the error. If any server-side errors are logged, this will create an error_log.txt file in your site's root directory. Please send me its contents. Once that is done, you can revert the changes you made to wp-config.php.
Using Twenty Seventeen eliminated the problem.
So I created a child theme for GP and the problem did not show up. Even without the modifications you suggested.
I reverted back to the original GP theme, and everything is working again. I'm not sure why it was not working before.
Thanks for the assistance. If it happens again, I'll look into the server logs or try to create the child theme again.
Leo