I still having problem with the code, but now i have another problem more important un the form
When guest try to upload a image the form says "There was an error uploading your file." . From administrator it works
I try to search in access and other parts but i did'nt find any answer.
THank you
Fausto
Hi, the only way guests can upload images in a CRED form is if you provide a custom image field. Are you describing an error when Guests use a custom image field, or when Guests use the "Add Media" button? The "Add Media" button is a bit misleading here, because WordPress does not give Media Library access to Guests. That is a limitation of WordPress that Access is not set up to change.
Thank you
i still having problem , i changed with a custom image field but i'm having the same error
You can see here:
hidden link
Thank you for your help
Fausto
Okay thanks, can you try these troubleshooting steps first?
- Temporarily deactivate all plugins except Types, Views, and CRED. Activate a default theme like Twenty Seventeen, then retest as a Guest
- If the problem was resolved, reactivate your theme and other plugins one by one until the problem is revealed
- If the problem was not resolved, I need to create a clone of your site to do some additional investigation. If it's okay with you, I will install the Duplicator plugin and create that clone, and begin testing.
Let me know the results and we can continue from there.
If i deactivate Toolset Access it works
there is a command from Access enable uploading images for guests??
There's no single setting in Access that controls Guests ability to upload custom images. Typically if you give Guests access to a CRED form, that is sufficient. However in your case something else seems to be going on, and I believe I must create a clone of your site to do additional investigation. I see you also have WPML and Media Translation active, so I need to check your configurations in those plugins as well. Please stand by and I will update you shortly.
Sorry for the delay getting back to you. I had some trouble creating a site clone so I had to temporarily disable the plugin WP Super Cache on the site. After creating the clone, I reactivated the cache plugin. Please confirm the cache plugin settings are still correct.
I was able to reproduce the problem on the site clone, and then I was able to confirm it occurs with only Types, Views, CRED, and Access active, and with a default theme like Twenty Seventeen active. The Access configurations all look good to me, so I'm not exactly sure what's going on. I was able to fix the problem by resetting all the Access settings, but I don't think that should be necessary. I will ask my 2nd tier support team to take a closer look, and we will update you as soon as possible.
Thank you so much for your work, Christian.
We are waiting, for the moment I put it is not mandatory and I send the images separately, but it would be better to load them directly.
Hi, please try to add this code to your theme's functions.php file, or wherever you place custom code:
add_action( 'admin_init','reset_guest_caps' ,9 );
function reset_guest_caps(){
global $current_user, $wpcf_access;
if(isset($_GET['formid']) && $_GET['formid']==16079&&$current_user->ID==0)
{
$wpcf_access->settings=array();
}
}
Thank you so much, it works
I hope I do not have to bother you anymore
Fausto