I have recently migrated to the new Post relationship format and my former one-to-many relation has been transposed by the installer tool.
So all existing relations (one-to-many) are still valid and display correctly in my views (Parent can display all children, one child can display its parent). It is rather smooth and good transition!
There is nevertheless a problem in the form: I have updated the CRED form according to the help and now the list of parents is not complete when I try to attach a parent to one child from the front-end. Furthermore, the few parents are displayed with their post ID in front which is not at all expected!
I have attached the front-end form with the issue: only few items (parents) are displayed there should be 47 and even doing a search by entering number is not getting the right parent and you can see the post ID in front. Could there be an issue with the database translation with the new format?
I also attached the relationship that was created for this one-to-many relation and the part of the form I modified in order to create or modify the association between parent (RocInfos) and child (Topo).
Thank you for any suggestion/advise.
christophe
1. Furthermore, the few parents are displayed with their post ID in front which is not at all expected!
This is known, we are removing it on Toolset Forms 2.0.1
2. I have attached the front-end form with the issue: only few items (parents) are displayed there should be 47 and even doing a search by entering number is not getting the right parent
That is a Select2 Field, it is used when you have more than 15 posts in the list.
If you have less, then that field will be a "Normal" select field.
Now, I do not know what posts you have in the backend, and how they are saved (maybe they are not public, that would be another issue we know about already) - so I would need more details on this case.
Please first make sure all those posts you want to see are public posts.
If then the issue persists, please can you show me the backend of the site - I will eventually head to Toolset > Export and export a few data sets, if this is OK, I could then try to use that to replicate a similar issue locally and check if I can help you to solve it.
But first, please check that all posts are public, and that no other plugin is the cause of this issue.
On my local tests, unless above 2 bugs, this works fine.
- all posts must be public right now (will be adjusted)
- post ID will be removed from that list in future
Hi Beda,
Thanks for your answer.
>>That is a Select2 Field, it is used when you have more than 15 posts in the list.
If you have less, then that field will be a "Normal" select field.
I don't know what is Select2 compared to Normal select.
I have 47 parents that are public and 55 children that are not all public. Should both parents and children be public for the relationship to work?
In fact all the children are public but some have access controlled by Toolset Access.
Hello,
The problem you mentioned above is abnormal, please check these:
1) Deactivate other plugins (except Types plugin) and switch to wordpress default theme 2017, and test again
2) If the problem still persists, please provide a database dump file (ZIP file) of your website in below "private detail box", also point out the problem page URL, and Toolset form URL, I need to duplicate same problem and debug it in my localhost, thanks.
Thanks for the details, I assume we are talking about the Toolst form "Formulaire de saisie de Topo" and field "RocInfos associé":
<label class="cred-label">RocInfos associé</label>
[cred_field field='@rocinfos_topo.parent' select_text='--- aucun ---' class='form-control' output='bootstrap']
Since the all the "RocInfos" posts are using similar title:
RocInfos 1
RocInfos 2
RocInfos 3
It is hard to find the result with the select2 feature, in your case you can disable the select2 feature, for example, modify above [cred_field], add attribute use_select2="never", like this:
<label class="cred-label">RocInfos associé</label>
[cred_field field='@rocinfos_topo.parent' select_text='--- aucun ---' class='form-control' output='bootstrap' use_select2="never"]
Then it will be able to display all options.
Thanks Luo, this fixes my problem. I have a new drop-down selector with all the posts displayed.
It is a different approach than before because you have to select in the list and not possible to enter values for a search functionality now. But at least it is possible to select one out of all the posts!
I tried to find this option in the documentation but couldn't find it... should the documentation be improved? Or did I look in the wrong place?
Regards