Tell us what you are trying to do?
I am trying to add a View Block for my custom post types. Each time I try, the View block displays this message "There were no posts found to display for this View's query." I've tried changing the Content Selection Source, but none of my post show up. I keep getting the same error message.
Is there any documentation that you are following?
I've tried looking but couldn't find anything to this particular problem. I did see in another article to try Flushing the Object Cache. I sometimes have to do this when I add new Custom Fields to my Custom Post types, in order to see them on the Edit Post page. I flushed the Object Cache twice and this has no effect on this issue.
Is there a similar example that we can see?
No sure. I'm using Divi, but I followed your suggestion to not mix the two (Divi and Toolset) on a single page.
What is the link to your site?
I can't send you a link to the page where I'm trying to add the view, because it will not let me publish the post. The button text is greyed out and is non-responsive. So I can't really provide you with a link to this page.
The link to the site is: hidden link
Hello,
Yes, you are right, Toolset Blocks plugin is based on WordPress Blocks editor(Gutenberg editor), both Blocks editor and Divi page builder are page builders, it is not recommended to design the same page using both page builders, it will conducts unexpected result. See our document:
https://toolset.com/course-lesson/using-toolset-with-divi/
To avoid compatibility issues you shouldn’t mix Divi and Toolset elements on the same page.
I suggest you check this in your screenshot:
https://toolset.com/wp-content/uploads/2020/08/1745955-Screen_Shot_2020_08_20_at_6.46.44_PM.png
Select View block, see screenshot select-view-block.JPG
In the block setting sidebar, check these:
1) Section "General", you can disable View's cache in option "Cache View"
2) Section "Query Filter", make sure you are using correct filters, and remove those filters you don't need. See screenshot query-filter.JPG
Hi Luo,
Thank you for your reply.
I have followed your suggestion (to disable View's cache in option "Cache View" and check my Query Filters), but I am still having the same problem where the View is giving me an error message "There were no posts found to display for this View's query." I've attached a screenshot with the suggested settings.
Please let me know if there is something else I need to do in order fix my View issue. Thanks.
Please share your website credentials in below private message box, also point out the problem page URL, I need to test and debug it in a live website, thanks
Thanks for the details, I can see the problem in your website, there are lots of JS error in that page, see my screenshot js-errors.JPG
The problem is abnormal, and you did not provide network admin credentials, so I can not deactivate plugins/theme in your website, please try these:
1) Make sure you are using the latest version of Toolset plugins, you can download them here:
https://toolset.com/account/downloads/
2) In case it is a compatibility problem, please deactivate all other plugins, and switch to wordpress default theme 2020, deactivate all custom PHP/JS code snippets, and test again
3) Also check if there is any PHP/JS error in your website:
https://toolset.com/documentation/programmer-reference/debugging-sites-built-with-toolset/
4) If the problem still persists, please provide database dump file(ZIP file) of your website, you can put the package files in your own google drive disk, share the link only, I need to test and debug it in my localhost, thanks
https://toolset.com/faq/provide-supporters-copy-site/
Hi Luo,
Thank you looking into this for me. Sorry I forgot to grant you super admin privileges for the Network. I just did that now so you may access the plugins and themes now as a Super Admin.
Thank you for your support in this.
Hi,
Thanks for writing back.
Luo is on a holiday today, so I'll be following up on this ticket.
I noticed the following error message in the browser's console while creating a view in the Blocks editor:
Uncaught (in promise) {code: "invalid_json", message: "The response is not a valid JSON response."}
This suggests that something on your website is blocking or interfering with WordPress REST API calls which are also needed for the blocks editor to function properly.
To confirm and narrow down to the possible cause, I'll recommend the following steps.
1. Please deactivate all plugins other than the Toolset plugins, as Luo suggested in his last reply.
If it's fixed, you can start adding the disabled items, one-by-one, to narrow down to a possible conflicting one.
2. In case the issue still persists, you can consult your hosting's support team to see if they have enabled any security measures which can interfere with the WordPress REST API calls.
3. It would be also interesting to see if this website's clone/snapshot works on a different server, which would confirm that issue is limited to the hosting/server environment.
I hope this helps and please let me know how it goes.
regards,
Waqar
Hi Waqar,
Thank you for your message.
I will follow your recommended steps and let you know if the issue is fixed. And that is a good idea about the 'clone/snapshot' as both sites experiencing the issue are hosted with the same provider.
I will get back to you soon on this. Thank you again for this support.
You're very welcome and I'll wait to hear back from you.
My issue is resolved now. Thank you for your help with this.
The problem was with the Web Application Firewall with my hosting provider. By disabling it, the View output now works.