Skip Navigation

[Resolved] When submitting an ad through the front end, two ads are created

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

Problem:

The issue here is that whenever the user creates a new post using CRED and add an image to any custom field on that form then 2 posts are created.

Solution:

This was a conflict with our plugin and the relevanssi plugin.

I've seen that on our Internal system that the issue has already been identified. This is scheduled to be fixed in version 1.9.6 of CRED but currently we have an errata open for this .
https://toolset.com/errata/cred-auto-draft-posts-created-when-relevannsi-cred-and-featured-images-are-used/

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

Our next available supporter will start replying to tickets in about 7.33 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 15 replies, has 2 voices.

Last updated by AndreiP3974 6 years, 10 months ago.

Assisted by: Shane.

Author
Posts
#611325
AdSubmit-entries.jpg

I am trying to:
Setup a front end submission form for ads, using:
a) custom post type Produse
b) custom fields
c) custom taxonomies (category and tags)
d) CRED form

Link to a page where the issue can be seen:
hidden link

I expected to see:
A new ad added

Instead, I got:
Two entries are created:
1. the first one has: the Title and Post content (only native, WP fields)
2. The second one has all custom fields: Price, Currency, Image, Location, Phone number and its name is CRED Auto Draft and a code

What am I doing wrong? 🙂

Thank you in advance,
Andrei

#611328

By the way, the Custom post type for ads is Produse: hidden link (i've provided login details in my previous message in this thread)

#611442

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Andrei,

Thank you for contacting our support forum.

In order to ensure that this is not being caused by some custom code applying to your form. Could you try creating a new form for this exact cpt and see if this issue still remains.

Thanks,
Shane

#611465

Thank you, Shane
Unfortunately a new form didn't solve the problem. However, let me try one more thing - I'll prepare a new group of custom fields for the custom post and a new form and then will come back to you with an update.

Meanwhile, If you have some spare time to enter the admin zone of the site (I've provided the credentials) - please feel free to take a look. maybe you find some missconfiguration or some settings I've omitted.

thank you in advance

#611499

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Andrei,

Sure I'm currently having a look now.

Thanks,
Shane

#611500

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Andrei,

I tested the form and it doesn't produce another post after it was submitted. Only 1 post is created.

Were you able to resolve the issue ?

Please let me know.
Thanks,
Shane

#611845

Thank you Shane!
Your experiment has disclosed the problem. Only when you add a picture to the post, the form would generate two posts.
I've placed an ad without adding a picture - it was placed correctly (as in your case). The next ad had a picture included and then again the post has split in two: native fields and custom fields.

Please help me find and correct the error

#611989

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Andrei,

This is really strange as CRED doesn't do this normally.

Could you provide me with some info on when this started happening ?

Also could you temporarily disable all the non-toolset plugins and switch to a default wordpress theme and try again ?

Looking forward to hearing from you soon.
Thanks,
Shane

#612009

Hi Shane,
When I've deactivated Relevanssi the ad was created correctly.

#612014

Shane, I've added Featured image as a field to the form (also checked this option in the Custom Post Type settings). Added a new ad with picture uploaded via Featured image field (no picture for old Image field), activated Relevanssi. Again two posts created.
It seems like the image is the problem - no matter how one it is uploaded.

#612299

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Andrei,

With your permission could I install the duplicator plugin so I can create a clone for further testing on this issue ?

Please let me know.
Thanks,
Shane

#612344

Hi Shane, no problem

#613024

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Andrie,

I'm looking at this now.

#613031

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Andrei,

I have good news. I was able to replicate this issue in relevanssi with CRED without even cloning the site.

Also I've seen that on our Internal system that the issue has already been identified. This is scheduled to be fixed in version 1.9.6 of CRED but currently we have an errata open for this .
https://toolset.com/errata/cred-auto-draft-posts-created-when-relevannsi-cred-and-featured-images-are-used/

Please try the above solution and let me know if it works for you.

Thanks,
Shane

#613151

Thank you, Shane!