Skip Navigation

[Resolved] post form not saving uploaded images

This support ticket is created 5 years, 4 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

Tagged: 

This topic contains 15 replies, has 2 voices.

Last updated by valentinD 5 years, 4 months ago.

Assisted by: Minesh.

Author
Posts
#1364039

I'm using a post form to create new content for a custom post type.
This is a real estate type site that I want unregistered users to be able to upload images to. Though I don't want them to have access to the WP media library to see or use other images.

The forms works fine as long as the user does't upload images - if they try too, the form does not submit properly and the new post does not appear. This is probably a simple access matter but I haven't found the problem in my settings.

The form is set to publish so if you want to test it, the post should appear right away.

Thanks for any help on this!

#1364045

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

As I understand - the basic issue is if you try to upload the image with your form, the image is not get uploaded - is that correct? If yes:

I need to review your form and for that I need access details and problem URL.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#1364071

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Can you please share the problem URL where the form is added?

#1364087

Sure, I've updated my earlier post with the url.

#1364117

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I would like to know the form should be access as guest user and you want guest user should be able to use the media uploader? or the issue is as a guest user when user try to upload image the form is not working?

#1364121
screenshot_100.png

The form should be visible and fully usable for anyone visiting the site - so not just registered users.

The form should allow anyone to upload images but only registered users with admin, editor etc. permissions to be able to see / browse the wp media library.

The issue is that forms completed by unregistered users who upload photos is that the form is not saved. If they don't include photos the form is saved.

There are no problems if you are a registered user.

Hope this answered your question.

#1364241

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I've created post form to create a new entry and added a custom repeating image field to it and also set this form to submit with AJAX.

I see my form just works fine but when I checked with your form it is stuck when I try to submit the form.

In order to minimize the cause of the issue and to ensure their ins no possible conflict with any plugin or theme:
Could you please try to resolve your issue by deactivating all third-party plugins as well as the default theme to check for any possible conflicts with any of the plugins or themes?

Do you see any difference? If no:
I will need a duplicator copy of your install.
=> https://toolset.com/faq/provide-supporters-copy-site/

I have set the next reply to private which means only you and I have access to it.

#1365279

Hi Minesh,

Everything okay with the files I sent you?

#1365521

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Ye - I got the files and I've just able to download it. I will install the duplicator package on my install and get back to you with updates as soon as possible. Please hold on for further updates.

#1366037

Thanks Minesh, I'm looking forward to your update.

#1366341

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I checked using admin user and I can upload the image successfully using the Form.

Using what user role you see the issue? As a guest user you can not have access to media library. Can you please clarity what user role I should be loggedin and try to upload image and submit the form?

#1366619

As per my first post - "This is a real estate type site that I want unregistered users to be able to upload images to. Though I don't want them to have access to the WP media library to see or use other images.

I want anyone who come to the site to be able to complete the details of the form and be able to upload images. That do not need to register.

#1367091

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

As per my first post - "This is a real estate type site that I want unregistered users to be able to upload images to. Though I don't want them to have access to the WP media library to see or use other images.
===>
Well - if user is not registered or he is trying to submit form using Guest user - he/she will not have access to media library.

The following line is already added to our Doc:

Only logged-in users can use the native WordPress media manager. Visitors can upload their media files using basic HTML file inputs.

Please check the following Doc more closely:
=> https://toolset.com/documentation/user-guides/using-the-native-wordpress-media-manager-in-front-end-forms/

So, if you are loggedin as subscriber role or author role etc..etc.. then you will be able to use the media uploader to upload the image.

However - yesterday we publish new version of Toolset plugins for Types, Views, Forms etc..

*** Please make a FULL BACKUP of your database and website.***
Could you please update ALL Toolset plugins to it's latest officially released version. You can download the latest plugin release from your accounts page:
=> https://toolset.com/account/downloads/

I hope this is clear now how you upload work when you try to upload image as guest user.

#1367117
screenshot_104.png

Hi Minesh,

Thanks for your reply. So i need to uncheck the "native WordPress media manager" option in order for this to work with un-registered users? (see screenshot)

Thanks.

Update - I just unchecked that box but it's still not working. Maybe another permissions setting elsewhere?

#1367397

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Ok - I see that your form is set to submit with AJAX with image and this is a known the issue.

you need to uncheck that checkbox setting "Submit this form without reloading the page (use AJAX)" and save your form and then try to submit the form with the image.

This issue is known for now. Please check the following errata page:
=> https://toolset.com/errata/guests-cannot-create-posts-using-forms-that-include-file-or-image-fields-when-access-is-active/