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?
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?
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.