Skip Navigation

[Resolved] Access not restricting

This support ticket is created 4 years 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
9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 - - 9:00 – 13:00
14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 - - 14:00 – 18:00

Supporter timezone: Africa/Casablanca (GMT+00:00)

This topic contains 7 replies, has 2 voices.

Last updated by katjaL 4 years ago.

Assisted by: Jamal.

Author
Posts
#1580091

I try to restrict custom post type totally from not-logged-in users. So I do the normal steps:
- manage the post type with access
- disable read for guests

Still the posts are there to be seen without logging in. A strange thing also is that if I use the permalink mysite.com/mycpt/apple the post is empty (the title is there though) and if I access the page mysite.com/?mycpt=apple I get whole content.

This site building is in very beginning, so there are very few plugins installed at the moment and theme is Astra.

#1581093

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+00:00)

Hello and thank you for contacting the Toolset support.

I wanted to check you installation but the password is not working for me, can you update it?

Can you give a post URL that is still visible for guests?

#1583579
#1585349

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+00:00)

I suspect that this may be caused by a conflict with the theme or another plugin, probably cache also.

On your test site, please check if this issue appears when:
- Only Toolset plugins are activated. It will tell us if there is an interaction issue with another plugin.
- The theme is set to a WordPress default like Twenty Fourteen. It will tell us if there is an interaction issue with your theme.
If the problem disappears, start activating one at the time to track where the incompatibility is produced.

If this does not help, I would like to take a copy of your website for further debugging locally. We prefer to use Duplicator.
https://toolset.com/faq/provide-supporters-copy-site/
Your next reply will be private to let you share a download link safely.

#1585601
#1586697

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+00:00)

Thank you for your feedback.

I also tried on a new installation locally, with a new custom post type, without issues. As this is happening for your website on a minimal configuration, we will need to exclude any possible server issues. We can do that by taking a copy of your website and checking it locally.
If the issue is also present within the local copy, we'll assume that some edge cases are encountered with the website data, and we'll need to debug it, using development tools, which we cannot do on your server.

#1586741

Hi, here are the download links:
hidden link
hidden link

#1588545

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+00:00)

Hello,

If we deactivate the query_var option in the definition of the custom post type at "Toolset->Post Types->Edit Post Type" we can disable access to the post by the URL /?mycpt=apple. This will display the homepage instead of the single post page.

/mycpt/apple does still display the title of the post instead of display the "Login" content template. I am reaching our 2nd Tier to get assistance on this.

Currently, you are displaying a view of the custom post type at the homepage. This view will not be restricted by access. You will have to restrict it within the page using the "[toolset_access]" shortcode. As there is not similar block right now, you will have to use a "Classic" or a "Fields and Text" block to use it. Check this screenshot hidden link
Check this article https://toolset.com/documentation/user-guides/access-control/access-control-texts-inside-page-content/

I'll get back to you as soon as possible.

#1588807

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+00:00)

For guest users, you have configured Access to show the "Login" content template instead. But the content template is empty, that's why the page show only title, author, date, comments and show nothing else(empty content template).

I added a login form to the content template "Login", and I was able to see the login form when not connected.

The title/author/date/comments are a theme feature, as long as we are on the single-post page, it shows them. This must be removed from the theme. Let me know if you found trouble removing them.

Let me know if deactivating query_var for the custom post type is okay for you.

I hope this helps. I'll remain at your disposal.

#1588817

Thank you Jamal. Perhaps it would be good to somehow emphasize this query_var option disabling in access restriced content documentation. I somehow just couldn't figure out what was wrong. Thank you again for helping me out!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.