Skip Navigation

[Resolved] CRED Auto Draft images not being deleted from the Media Library

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

Problem: Images that are uploaded using CRED are stored in the Media Library even if the form is not submitted. They are not deleted automatically when the auto-draft post is deleted on the normal cron schedule.

Solution: Programmatically there is not a good way to know whether or not these media items have been used elsewhere on the site, so we will leave them in the Media Library indefinitely.

This support ticket is created 6 years, 6 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)

Tagged: 

This topic contains 4 replies, has 2 voices.

Last updated by lindsayH 6 years, 6 months ago.

Assisted by: Christian Cox.

Author
Posts
#578113
CRED Auto Draft.png

Here Waqas mentions that "CRED deletes all auto drafts created, if they're not used within 4 hours after creation. That means, the unattended or leftover media files will automatically be deleted from your system."
https://toolset.com/forums/topic/cred-upload-save-file-befor-submit/#post-463202

That doesn't appear to be happening. Please see screen shot.

#578282

Hi Lindsay, I'm checking on this and will get back to you shortly.

#578350

Okay after a test I can confirm the behavior you're describing - uploaded media items are not deleted after 4 hours, when the form is not submitted. I've asked my 2nd tier support team to clarify the expectations here. It's possible that Waqas was given the wrong information, or it's possible that there's a bug. I'll let you know what I find out.

#578767

After some discussion with 2nd tier support and our lead developer, it appears that Waqas had the wrong information here. While CRED Auto Draft posts are deleted after 4 hours, we do not automatically remove attachments that were added to those draft posts. The reason is that programmatically, we have no way of knowing whether those images have been used elsewhere on the site. So for now, the images will remain in the Media Library indefinitely. I will update that other ticket to include more accurate information.

#580007

OK, thanks for the extra explanation and updated information.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.