Navigation überspringen

[Closed] There was a problem creating the related content: Thes two elements are…

This support ticket is created vor 1 month, 2 weeks. 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Zeitzone des Unterstützers: Asia/Kolkata (GMT+05:30)

Dieses Thema enthält 1 reply, hat 1 Stimme.

Zuletzt aktualisiert von Minesh vor 1 month, 2 weeks.

Assistiert von: Minesh.

Author
Artikel
#2856841

We are troubleshooting what appears to be an issue with a migrated Toolset relationship, and we would appreciate your help identifying whether this is a known bug, a data integrity issue, or an unsupported state caused by the migration history.

Summary of the problem

We have an old migrated relationship that became unreliable:

old relationship slug: artist_releases
old relationship_id: 2

It started failing when trying to connect artist and release posts, with the message:

There was a problem creating the related content: These two elements are already associated and the relationship doesn't allow non-distinct associations.

(they are not already associated)

We confirmed that:

other relationships on the site still work
the old artist_releases relationship is migrated/legacy
relation tables exist and use the www_ prefix
some old/orphaned associations existed in the old relationship
but the main issue seemed to be that the old relation as a whole had become unreliable and the views like showing the parent "artist" in a "release" gives a "no result found"

To work around this, we created a new relationship:

slug: artist-release-links
relationship_id: 8
many-to-many
with intermediary post type artist-release-links

We have migrated around 400 / 1000 of the old connections and been able to create a view that shows all releases at an artist page. As soon as we import a "corrupt row", the view breaks with "no result found".

Do you know what this could be and how to get the relationships working again or a workaround?

#2856903

Minesh
Unterstützer

Sprachen: Englisch (English )

Zeitzone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Based on the debug information you shared - I can see that you are using the PHP version 8.5.5.

What if if try to setup a sandbox site with PHP 8.0.x or 8.1.x (I hope you have old backup with your original legacy post-relationship) and then try to remove the orpan posts from the post-relationship and then try to migrate to new post relationshp.
- Did you have old post relationship - many-to-many?

Please chck the following related Doc:
- https://toolset.com/2018/05/when-if-to-migrate-relationships-in-old-toolset-sites/
- https://toolset.com/documentation/customizing-sites-using-php/post-relationships-api/how-to-migrate-your-site-to-new-post-relationships/

Once you setup a test site with your original legacy state of post relationship - I will try to migrate that to new post relationship and can guide you further.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

The topic ‘[Closed] There was a problem creating the related content: Thes two elements are…’ is closed to new replies.