Home › Toolset Professional Support › [Resolved] Ajax upload in Cred
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 |
---|---|---|---|---|---|---|
- | 7:00 – 14:00 | 7:00 – 14:00 | 7:00 – 14:00 | 7:00 – 14:00 | 7:00 – 14:00 | - |
- | 15:00 – 16:00 | 15:00 – 16:00 | 15:00 – 16:00 | 15:00 – 16:00 | 15:00 – 16:00 | - |
Supporter timezone: Europe/London (GMT+00:00)
Tagged: Content-submission forms, Toolset Forms
Related documentation:
This topic contains 31 replies, has 3 voices.
Last updated by Waqar 5 years, 5 months ago.
Assisted by: Nigel.
Languages: English (English ) Spanish (Español )
Timezone: Europe/London (GMT+00:00)
Hi Jason
I checked the internal tickets for this.
We have an update to Forms 2.2 due soon, but I'm afraid there isn't a fix for the issue with the lost featured images included, it is slated to be worked on subsequently.
It happens when using the filter to disable ajax uploads in an edit form. (You have to delete the existing featured image and add it back again in that case, which is what we need to fix.)
I'm not sure about 2).
I scanned back through this thread but I don't recall what is happening in terms of "forwarding after editing the existing post". Can you remind me what's going on there?
Hey, Nigel.
How do I make it to where this doesn't happen? I need that featured image to populate the site in several different places. I also need for my customer to be able to determine which image is being featured. I can't just tell them "Sorry, you can't edit your listing and mark it sold, or add pictures, or a link to another place, or add a video.. without re-uploading the Featured Image. This is a huge problem. 🙁
Was this a result of something I did wrong? I need a solution for this or a workaround or something. 🙂 The whole thing works awesome except for that.
The other deal I was talking about is when I edit a listing (yeah it deletes the featured image) but it's not forwarding like it is supposed to on submit. It's supposed to show the listing itself, which is how I have it setup. I just shows a blank page with the navigation and in the content area, it just shows a '1'.
Thanks as always. 🙂
I guess I can just un-disable ajax for the time being (like I said, I haven't worked on this in a couple months so I forgot what was making it do it). Is there a way to declare the size of the ajax uploaded picture thumbnail? =]
Languages: English (English ) Spanish (Español )
Timezone: Europe/London (GMT+00:00)
If I recall correctly, disabling ajax was necessary for automatically renaming the uploaded images to work. When the images are pre-uploaded via ajax because the form is submitted, then the post whose title will be used as the filename hasn't been created yet.
Regarding the size of the thumbnail, well, it is the thumbnail-sized image that is returned, by default 150x150. If you wanted it to be different you'd need to add a CSS rule to the form.
Inspecting the preview thumbnail it looks like it could be targeted with
wpt-credfile-preview img { /* rule */ }
but you should double-check if that is the same for the featured image field if that is the one you want to target.
The form redirect is not something I have heard of before.
Do you see any JS errors in the browser console or PHP errors in your logs?
I would try to isolate the issue by de-activating any customisations you have added, disabling non-Toolset plugins, and/or switching theme to twentyseventeen to see if any of these remove the problem.
Nigel,
AJax: I remember now. It was turned off to where the image re-naming would work. Thank you again for that (truly amazing).
Featured Image: I guess I can only assume that this issues of bouncing the featured image out on edit, is a glitch in the code that is going to take some doing to re-write? I'm just a little surprised this issue hasn't come up before and subsequently fixed.
My question at this point is.. is there a workaround to where I can keep the image re-naming going and have a featured image work where it's populating the listings around the site? I'm just confused on how to proceed. Everything is so close to being perfect, especially thanks to you!! 🙂
Redirect issue: Strange. I have it set to display the post after editing. It was set on a 1 second redirect without using ajax. I just changed it to 0 seconds and it works fine now. One of the updates (of something) had to of messed it up.
Languages: English (English ) Spanish (Español )
Timezone: Europe/London (GMT+00:00)
Hi Jason
Unfortunately, as is often the case in life, you can't have both things, it has to be one or the other, at least, until Forms 2.3 is published.
Until then I think you will need to forgo the "luxury" of automatically renaming the image files to be able to meet the requirement of having a functioning form with regard to featured images.
There is not much I can add, when you ask about progress I comment on the internal ticket so that the Forms developers know to keep it on their plate, it's just that this is not the only thing currently on that plate.
I don't have an estimate for when a fix will be available, but it seems clear (to me) that a functioning form is more important right now for your users than the file renaming.
Again, I'll let you know when there is news.
But I want everything in life. 😉 Lol. As always, I very much appreciate your time and help with all of this.
Thanks, Nigel!!
Languages: English (English ) Spanish (Español )
Timezone: Europe/London (GMT+00:00)
Hi Jason
A fix for this is finally out (the issue being that featured images were being lost from edit forms when you have uploading images by ajax disabled).
Please go ahead and update Forms (and Views was also updated today).
Let me know if you still see any problems.
Languages: English (English ) Spanish (Español )
Timezone: Europe/London (GMT+00:00)
Sorry Jason, scratch that.
My colleague advised me this was fixed, but has just corrected himself to say that it is not and instead will be obsoleted by a change to Forms to use the built-in WP media manager for uploads which will come in a full Forms release that is due fairly soon (from the internal ticket I'm guessing a question of weeks), but not today.
Hey there, Nigel. Long time no see.
So in this new release will we be able to upload a gallery of files in one click then instead of having to upload them one at a time? That and you'd written an image re-naming snippet for me, is that still going to work as well?
Thanks for the update!
Languages: English (English ) Spanish (Español )
Timezone: Europe/London (GMT+00:00)
Yes to uploading multiple images at once. The snippet could need editing, or it might work without any changes. We'll need to test when the new version becomes available, and if it breaks then I'll need to look at what changed to fix it, but we will surely get it to work, don't worry.
Okay. Thanks again for the heads up. I'll wait on the update again. Hopefully it doesn't take months like this.
I can't say I'm not bummed that this has taken this long (more than 6 months) to address. It's the biggest part of what's completely derailed me in this project as I can't deliver the site when it doesn't work properly for the client. 🙁
The new update will make up for it though as I've waited 7 years for the gallery upload. Lol. I'll survive it.
Not your fault, Nigel. at all. I appreciate your help!!
Thanks again for everything! 🙂
Jason
Languages: English (English ) Spanish (Español )
Timezone: Europe/London (GMT+00:00)
Hi Jason
Quick update to say the internal tickets have been updated to show this will be fixed with Toolset Forms 2.4 that is currently undergoing testing and should be out fairly soon, so I'm just updating the status to reflect that, and I'll post a reminder when the update is published.
Cool. Thanks, Nigel!
A reminder will be awesome...
Languages: English (English ) Spanish (Español )
Timezone: Europe/London (GMT+00:00)
Hi Jason
Forms 2.4 spent a long time in testing but has now been released.
Can you update—backup first!—and see how this affects your workflow so that we can assess whether any changes are needed in your code etc.?
Let me know how it goes.