[Résolu] CRED attaches images to "Auto Draft" post with WP 4.74 & WooCOmmerce 3.0.4
This support ticket is created Il y a 7 années. 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.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
WooCommerce product images uploaded via CRED add forms aren't attached to the product post in question. They appear on the WP media page but are listed as attached to a post called "Auto Draft".
I tested it with a plain WP installation running CRED, WP 4.7.4 & WooCommerce 3.0.4. The form I use is set to add products with the status pending, the same problem happens when set to publish though.
On the WP media page (.../wp-admin/upload.php) images added to a CRED upload field are showing "Auto Draft" as parent item before submission (and after). This only happens for WooCommerce product posts though.
I have a form for another custom post type where uploaded images (before form submission) have a parent item looking like this "CRED Auto Draft 891a31d472996dcef4aa8e0a50665fe3" on the WP media page. Once the form is submitted the images are attached to the post in questions as intended.
So it seems the images not attaching problem is isolated to the WooCommerce product custom post type.
I checked your product post and it actually shows exactly the issue I described:
The images are added to the WP Types image upload fields, BUT NOT actually attached to the post. Please have a look at the media attached to the post in the edit post media upload popup (there none...).
And when you open the general WP media uploader (.../wp-admin/upload.php) you can see that the images you just uploaded are attached to a "Auto Draft" post (but not the actual product post you created with that images).
I see the issue here and it is not a problem with our toolset plugins. I Tried adding the post manually through the backend and then attaching a featured image and then save and this issue is still present.
The issue also occurs on a regular post as well so this seems to be a bug in wordpress and as such we are not able to do anything really about this.