I have Posttype1 and Posttype2 with one-to-one relationships.
And I have issue:
- no Posttype2 shown in window of "Connect existed Posttype2" modal box, just "no results found"
- I have some error in dahsboard in relationship post:
Warning: count(): Parameter must be an array or an object that implements Countable in /munchenguide.com/wp-content/plugins/types-access/vendor/toolset/toolset-common/inc/m2m/association/query/association_query_v2.php on line 322
Warning: Invalid argument supplied for foreach() in /munchenguide.com/wp-content/plugins/types/application/viewmodels/related_content_post.php on line 117
Warning: count(): Parameter must be an array or an object that implements Countable in munchenguide.com/wp-content/plugins/types-access/vendor/toolset/toolset-common/inc/m2m/association/query/association_query_v2.php on line 322
Both mistakes disappear in parent post type, if I make it one-to-many, but still "no results found" if I try to connect posts by editing child post.
And everything is ok if I make it many-to-many...
Really strange.
Hello,
The problem you mentioned above is abnormal, please try these:
1) In case it is a compatibility problem, please deactivate other plugins, and switch to wordpress default theme 2017, and test again
2) If the problem still persists, please provide database dump file(ZIP file) of your website, also point out the problem page URL, I need to test and debug it in my localhost, thanks
https://toolset.com/faq/provide-supporters-copy-site/
Thanks for the details, I have tried your database dump file, it works fine in my localhost, see screenshot city.JPG.
So it might be a server problem, please check these:
1) Check if your webserver meets the requirement of Toolset plugins
https://toolset.com/toolset-requirements/
2) If the problem still persists, please provide a live test site with the same problem, we need a live website to test and debug.
Thanks for the details, I have already tried the opposite connect City posts from single CitiesSights and CitiesEvents post in my localhost, there isn't the similar problem.
And I can see the problem in your website, it seems to be a server problem related to your PHP version, see similar thread:
https://toolset.com/forums/topic/error-warning-on-cred-form-with-post-reference-field/
can you try with other PHP version? for example the latest version of PHP 7.2.10:
hidden link
Actually I use PHP 7.2.10: hidden link
I will try different version
I tried with 7.0.32 and 7.1.22 - same results and back to 7.2.10.
By the way, I have similar issue with other site (https://toolset.com/forums/topic/some-error-with-relationships/ ) , probably it's connected to the same problem.
Anyway, for me is just looks strange that everything works well before (as minimum 1 month ago there is no error like this).
And actually I don't want to change hosting - Siteground is nice and I think very popular also among your customers...
What could we do to solve this issue?
This should be a problem of the "SG Optimizer" plugin, I have done below modification in your website:
1) Deactivate the "SG Optimizer" plugin,
2) Use FTP tool login your website, in "wp-content" folder, rename the file "object-cache.php" to "object-cache.php-bak"
Then test again here:
hidden link
See screenshot city2.JPG
It works fine.
I suggest you check it with author of "SG Optimizer" plugin, there should be an option to disable the object-cache.php
My issue is resolved now. Thank you!
Actually I don't disable entire SG Optimiser, but just switched off memcached option. It is something then this plugin (deeply integrated with hosting cache) use option to store database requests in server memory. It is not harm my site speed for now, but could be important in future.
Anyway, thanks a lot for your help - it was difficult to find the problem on my side.