Skip Navigation

[Resolved] Cannot create a new view with the WordPress default post type “Posts”

This support ticket is created 2 years, 7 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.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 18 replies, has 2 voices.

Last updated by Nigel 2 years, 7 months ago.

Assisted by: Nigel.

Author
Posts
#2383513

I am trying to create a view to create a custom posts archive for my blog/news page rather than using the theme archive/posts page settings because views are much better for customisation.

When I create a new view on the chosen page, whether I pick grid or unformatted, whether I select pagination, search, or none, and then select the post type content as “Posts” (the default WordPress post type), it tells me that there is nothing to display regardless of there being 8 posts.

#2383611

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

I'm not sure what the problem could be without looking: you say you have 8 Posts, and you create a View to display Posts, and it returns zero Posts, yes?

Would it be possible to get access to your site to take a look?

Let me mark your next reply as private so that we can get log-in credentials from you—you may want to create a temporary admin user for us to use that you can later delete. And be sure to have a current backup of your site.

Where are you trying to insert the View?

#2383793

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

I created a test View with the legacy editor on your site which worked fine, but when I tried to create a View using blocks I ran into the same problem you did.

As this appears to be a prodution site I don't want to risk breaking anything, so I've taken a copy to install locally where I can do some further debugging.

I'll get back to you.

#2383869

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

I don't experience the same problem on the locally-installed copy of your site, so it appears to be a server-related problem.

Could you prepare a staging site where I can do some testing without worrying about damaging your production site?

I'll set up another private reply to get credentials for that site (I can manage without FTP).

#2385075

Whoops that link is wrong, please remove the hidden link and that will give you the link required. (I just right-clicked copy link, my bad). If required, please allow me to send another private response with the correct link.

#2385283

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Screenshot 2022-06-15 at 08.15.14.png

I understand, and have the correct URL, I think, but the staging site itself seems to be protected and I need additional credentials to be able to access the log-in page.

I'll set another private reply.

#2386199

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Screenshot 2022-06-16 at 08.47.13.png

Thanks for that.

I did some testing on the staging site, disabling and re-enabling plugins and switching theme, trying to isolate the source of the problem, but I couldn't reproduce the problem on the staging site, I was able to create a View of posts without problem.

So I went back to your production site and made another test, this time with the network tab of the browser dev tools open, and I quickly saw the problem.

You can see in the screenshot that the server is blocking REST API requests made by Toolset Blocks (the 403 code).

You'll need to discuss with your host why these requests are being blocked. Interestingly, they are not blocking such requests on the staging site.

It's likely a security setting and a false positive for some test that triggers denying the requests.

#2387647

My issue is resolved now. Thank you!

I contacted my WPMUDev hosting support and they fixed the problem for me instantly. They said "For security, WAF log detail is: 212340 Cross-site Scripting (XSS) Attack, it detect as a script injection, but it is a false positive."

It works as normal now! Thank you very much.

#2387773

Hi sorry. I am trying to use the search for this view. I am not sure if it is my slow internet, but when I try to add a search field, it says the server is processing and will not do anything, just keeps loading... I have removed the admin role I had previously created for you so I will have to send you another one if you would please help me with this. Just want to make sure it isn't anything else before I decide my internet is just terrible.

#2388907

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

OK, I've set another private reply, I can take a look.

#2389151

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

I guess we are talking about the View "News Page" (it's the only View on the site).

I edited that View, and then inserted a Text search field (I'm not sure if that's the search you had in mind).

It all went smoothly, I didn't experience any problems using the editor.

Perhaps there was a server-issue at the time you were trying to make edits?

If you find yourself facing similar problems again, try navigating with the browser dev tools open, looking at the Network tab to see if there are any requests which are slow to respond or fail altogether.

#2401575

Hi there,

I did what you said, and although I do not understand the language, I believe it is the same issue as before.

The search text box works for me too, but I cannot create a filter for taxonomies (categories specifically).

In the dev tools, it says something about Rest API and uses error code 403. I am talking to my hosting support again and hope I can fix this issue. Not sure why this is happening.

Will let you know if I can fix this.

#2401695

Hi Nigel,

I fixed this issue, it was the same as before and the hosting support fixed it. As I moved on to the next part of my website, I created a custom post type called "Members" and created a custom field group for this. This custom field group will not show on the editor when I go to create a new "Members" post. I looked in dev tools, and it doesn't say the same thing as it did for the issues I had with the view block, and I am not a developer so I am really stuck again.

I'm very sorry that I have to bother you with this.

🙁

#2401773

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Sorry, could you share access details for the staging site again?

When you marked the thread as resolved initially, the sensitive data in the private replies was automatically stripped from the thread.

I want to perform some basic tests on the staging site. I expect there is likely a conflict with another plugin or plugins that is provoking the issue.

#2401873

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Sorry, it doesn't like the server protection details you provided.

Could you edit your last reply and try again?