Skip Navigation

[Resolved] Post Relationship Data When Posts Deleted

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

Problem:
There is a custom table to store post relationships. What happens to that data when one of the posts in the relationship is deleted?

Solution:
The corresponding entries in wp_toolset_associations is also deleted.

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

This topic contains 2 replies, has 2 voices.

Last updated by julieP 6 years, 5 months ago.

Assisted by: Nigel.

Author
Posts
#913353

I'd like to understand what happens to data in my database where the table wp_toolset_associations is concerned. Can you let me know please: if a parent or a child post is deleted, are the corresponding entries in wp_toolset_associations deleted automatically?

Thanks

#913371

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Julie

I just tested this myself and looked at what happened in the wp_toolset_associations table.

I had some existing data with related posts, which I could see in the table.

I trashed one of the posts that was part of such a relationship -- No change in the db table.

I permanently deleted the same post -- The corresponding row of wp_toolset_associations was removed.

So it appears that such house-keeping is automatic.

#914563

thanks Nigel that's good to know