Skip Navigation

[Resolved] Related posts not saving

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

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.

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 13 replies, has 2 voices.

Last updated by stewartE 7 years, 1 month ago.

Assisted by: Shane.

Author
Posts
#574837

I have 2 Custom post types called Sites and Certificates.

I have created a relationship between them by creating a new post type called related certificates with a parent post type of sites and certificates. I have then gone to each site post on my website and added the related certificates. I have done this before on another site with no issues and it also worked on dev.

I am able to add the related certificates as you would expect and the related certificate posts also exist but when i save the site post the related certificates that i have added are wiped out.

Thanks

#574919

Shane
Supporter

Languages: English (English )

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

Hi Stewart,

Thank you for contacting our support forum. I see that you mentioned that this works fine on your dev environment.

However as a quick test could you temporarily disable all your non-toolset plugins and try again just to ensure there is no plugin conflicts causing this.

Thanks,
Shane

#575427

Hi Shane, unfortunately I can't disable all the plugins in our production environment. Would you be able to take a copy of the site and do this on your end?

#575497

Shane
Supporter

Languages: English (English )

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

Hi Stewart,

Yes I can but can you install the duplicator plugin so that I can create the duplicate?

Thanks,
Shane

#575691

Thanks Shane - that's installed

#575761

Shane
Supporter

Languages: English (English )

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

Hi Stewart,

I've tried the credentials that you provided but they don't seem to work.

Could you provide them again in the private fields in your next response..

Thanks,
Shane

#575766
#575884

Shane
Supporter

Languages: English (English )

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

Hi Stewart,

Could you walk me through the process of testing this since i've setup the duplicate?

I checked the related certificates and their relationships are there. Please walk me through the exact steps.

Thanks,
Shane

#575981
dashboard.PNG
related-certs-correct.PNG
cert.PNG

Hi Shane

So I created a custom post type called sites and a custom post type called certificates. I then created a related post type called related certificates the idea being that I would display a list of certificates on the site page (see screenshot cert.png for how it looks in my dev site)

When you look in the site edit page in my dev site the related certifications are there as you would expect them to be (see screenshot related-certs-correct.png)

The next step is I went ahead and created the same set up in my live website. I then went through each site in order and added the related certificaties and saved. I did about 500 related certificates before i noticed that when i went back into the site edit page the certificates that i had added had been wiped out. So instead of seeing related-certs-correct.png I was seeing none.png.

When i looked in the related certs dashboard area (see dashboard.png) I can see the related certs exist but for some reason are not being associated with the sites (or I can associate them but can't save)

(note - i'm not expecting to see the certs on the front end yet as i haven't created that view)

Thanks!

#575987
none.PNG

sorry forgot to upload none.png

#576116

Shane
Supporter

Languages: English (English )

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

Hi Stewart,

Which Language are you viewing this on.

Remember that you have the WPML plugin installed so you have to account for the language that you are currently in. Lets say all the posts were related in English and then you go to German post then the relationship wouldn't exist since there isn't any german post to relate to.

Please let me know if this helps.
Thanks,
Shane

#576133

Hi Shane - so this is odd.

I had a look in the French language version of a site page and the certificates are there. However i definitely added them to the English version.

To test this I opened the Alajuela, Costa Rica site, making sure i was in English. I then added a new certificate and saved. When i looked in the English version of the Site page the certificate that i had just added had vanished. When I switched it into French the new certificate that I had added to the English version was in the French version of the page. So something is definitely wrong

Note the site pages are not translated and are set to be duplicates of the English version

Thanks

#576279

Shane
Supporter

Languages: English (English )

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

Hi Stewart,

Your Related Certificates CPT is not set to translate. So this is how it becomes complex because you can only relate to the same language post.

So if you have a Cetificate in English and relate it to a Related Certificate in English. If you were to translate the Certificate the translation won't be related to a Related certificate since its in a different language and then you can only relate 1 Related Certificate so you cannot connect that certificate to the same related certificate.

It will all need to be a done and connected manually.

Please let me know if you understand where i'm getting at.

Thanks,
Shane

#576840

I'm sorry I don't understand.

My related certificates are set to do nothing in both my dev and production environment but it works in dev and not production. The sites CPT is actually set to translate in the translation management dashboard, I also went through every single option in the translation management dashboard in both dev and production and they are exactly the same.

Can you tell me what i need to set / or do in production in order for this to work.

Thanks!

#576879

It's ok i figured it out 🙂