Skip Navigation

[Resolved] Split: Guests are unable to upload image using CRED

This thread is resolved. Here is a description of the problem and solution.

Problem: Guests who have Access permissions to a CRED form are unable to upload images in a custom field. An error is shown "There was an error uploading your file."

Solution: Please open a new ticket if you see this issue in your own site.

This support ticket is created 6 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 9 replies, has 2 voices.

Last updated by faustoT 6 years, 11 months ago.

Assisted by: Christian Cox.

Author
Posts
#613492

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

#613523

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.

#613676

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

#613844

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.

#614166

If i deactivate Toolset Access it works
there is a command from Access enable uploading images for guests??

#614306

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.

#615059

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.

#615141

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.

#615666

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();
	}
}
#615679

Thank you so much, it works
I hope I do not have to bother you anymore
Fausto