I'm trying to link a CPT to woocommerce products. I've created a 1-N relationship without any issues. But when I try to link product to my CPT, I get following error:
There was a problem creating the related content: These two elements are already associated and the relationship doesn't allow non-distinct associations.
I never get any products listed at relationship box at CPT editor...
Hello. Thank you for contacting the Toolset support.
That is strange. I will require to check the relationship you created and what posts you already associated with the post type.
*** 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.
I just checked with a test site and I do not find such issue.
Can you please tell me with what product I can see the message you shared. I'm checking the following post and I do not see any message with the post relationship box that you shred with your initial post:
=> hidden link
I'm not sure whats going on as I just checked with my test site and many-2-mnay relationship works and I can assign multiple posts within post relationship box without any issue. Please check the following screenshot:
=> hidden link
I suggest you should try to create a fresh post relationship and rule out the existing one (if you have not connected any posts yet using the existing many-2-many post relationship) and check if that works for you.
- deleted existing relationship
- added a new one (many-2-many products-supports). note that I don't enable 'create intermediate cpt' option
- tried to link product to support and got the same error
Hello there! Minesh is not available today. If you don't mind I'll continue with you on this ticket.
Please try to create a new many-to-many relationship between products and supports. It will be created with a unique slug. Activate the option to create the intermediary post type, and you can disable the option to display it on the backend menu.
Then try to connect posts. I am sure this time, it will work. If it does, you can go and delete the old relationships.
Even though you won't need the intermediary post type, for example, to add fields(date, status, anything), the intermediary post is required to assure the M2M links between posts.
If you are still unable to do so, please allow us temporary access to your website to check it closely. We might also need to take a copy of it for further debugging, let us know if that's fine with you?
Your next reply will be private to let you share credentials safely. ** Make a database backup before sharing credentials. **
Well, something odd is happening. I tried to create a new relationship between products and supports, but it seems to be created between only products. Which is not really a supported feature(same CPT relationships). Check this screenshot hidden link
I removed the existing relationships and created another one with a different slug(I assume it was not used before), but I still can't connect some posts, and I am getting the same message.
To better debug this issue, we'll need to take a copy of your website. Can I install a plugin(Duplicator or All In One Migration) to take the copy?