[Resolved] No relationship field even though I created many to many relationship.
This support ticket is created 6 years, 2 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.
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.
There is no option to add the relationship field on CRED form even though I created a many to many relationship based on coupons post type. see this screenshot hidden link
This is the many to many relationship I created see this screenshot hidden link
It's not a great workflow, but was the first implementation of being able to add related posts (and fields) from the front end.
On the back end you'll notice that you have to save a post before you can start adding/connecting related posts and filling the relationship fields.
On the front-end when you have a post form, the post isn't created yet to be able to add related posts and relationship fields.
It's possible, of course, to produce a technical solution to improve this, and the next dev cycle for Toolset Forms is currently being discussed. I've been pushing to include this in the next round of work, and so your question is timely, I will add it to the voices on this topic.
A relationship field doesn't belong to either of the posts that are connected with the M2M relationship (an intermediate post is created specifically to hold the relationship custom fields). A post form can only include fields of the post being created, so it is not possible to include relationship fields on a normal post form, you need to use a relationship form for that, and this is one of the things which will be improved in a Forms update (hopefully the next development cycle).
Regarding the error you are seeing, that's unexpected.
Before going any further, can I ask you to try temporarily disabling all non-Toolset plugins and switching to the twentyseventeen theme and checking whether you still see the warning? If not, it should be possible to determine where a conflict comes from by a process of elimination.
I don't understand I created a one to many relationship of Coupon that will connect to many Directory Listings. But still the relationship field on the Standard Form still doesn't have the option to add it. see this recording hidden link
That video whizzed past, I wasn't sure what I was supposed to see.
A one-to-many relationship doesn't have relationship fields (which are a many-to-many concept).
If Coupon is the parent and Directory Listings the child, coupons have fields and listings have fields.
A form to publish coupons can contain coupon fields.
A form to publish listings can contain listing fields.
In this case the one special field would be that a form to publish child listings can (should) include a field to set the parent coupon to which they belong. (It will be added automatically if you auto-generate a form to publish child posts.)
About the error see this recording hidden link I always encounter this every time I submit a form based on the relationship field. I already deactivated all the plugins which are not related to Toolset plugins and set the default Theme. But still I am having this error do you think the issue is my PHP version because it is not recommended my PHP version is 7.1. Or maybe something else.
I installed the site locally and I don't see the debug errors (although I did see a couple of unrelated PHP notices which you may want to investigate).
The debug info I have for your server says PHP version 7.0.31, not 7.1.
I don't think so. I don't have that exact same version available in my local dev environment, but I tried PHP 7 versions before and after that one and have the same result, namely that it works without error.
Do you have a staging or development server available?
I suggest you create a fresh WordPress install on a new server, and then export your site to that server using All in One WP Migration. (I see you have it installed already, that's why I used to take a copy of your site.)
Re-test the issue to see if the PHP errors disappear.
Given my experience I expect they will.
If that is the case then on your production server you could go to Dashboard > Updates and force re-install WordPress, then import the same archive that you successfully used to create the development server.
If you are able to try that let me know how you get on.