Tell us what you are trying to do?
I try to set up Access in a way that when visiting a page with restricted access the non logged in user sees a content template or page template. But all I get is this (see screenshot). How can I get a decent 404 page to work?
Is there any documentation that you are following?
https://toolset.com/course-lesson/setting-access-control/
Hello and thank you for contacting the Toolset support.
According to your Access settings, the option is not activated for Guest users(non logged in users). Check this screenshot hidden link
I hope this helps. Let me know if you have any questions.
I don't really get it.
1. I set cpt "dagboekberichten" to be invisible to guest and pending roles.
2. I set the post group "community logged in" to use a 404 content template for users without read permission
3. When I click preview link I get "No posts for preview"
4. When I click "post groups > modify group" it looks like I need to select each individual post to restrict access.
What I need is that access to each post of the type Dagboekbericht is automatically restricted to logged in users, without having to select them one by one.
How can I achieve this?
Post groups are used to restrict access to selected posts. That's not what you would like to have.
According to your first screenshot (Schermafbeelding 2020-11-14 om 10.32.46.png) the post type should not be accessible to non logged in users and users with the "Pending" role.
I run a test on a clean install and as you can see on the following urls, non logged in users are unable to access the posts:
- hidden link
- hidden link
Now if you login with the following URL, they will be accessible hidden link
If this is not working for your custom post type, please allow me temporary access to check this closely. Your next reply will be private to let you share credentials safely. ** Make a database backup before sharing credentials. **
It would be better if you can prepare a staging site, this way, I can run tests such as disabling plugins or switching themes.
The Access control settings were not restricting guest users hidden link
But even after disabling read access to guests, we still get the same error page.
I suspect that another component(theme or plugin) of the website is interfering with Toolset. 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 a time to track where the incompatibility is produced.
If we don't find the conflicting component, we'll need to take a copy of your website for further debugging locally. Let me know if you would agree.
With my theme activated I get an non-styled 404 page like you could see in the screenshots. I will get in touch with my theme developer to investigate this.
I have tested with the default WP theme and got a decent 404 page like you had in your sandbox.
I also disabled all plugins except Toolset and WPML, but this gave me the 404 page only, even though I had set up Access to use a content template (I created a template called 404 for this purpose).
So at first sight I don't find any theme or plugin conflicts. Please have a closer look at the issue. Since we are on a staging site with a daily backup you can freely activate and deactivate plugins etc.
Thank you!
Once we deactivate WPML, Access uses the content template 404. But when using WPML it does not. This was expected as you have an active WPML Group in Access on this custom post type. Check this screenshot hidden link
It is configured to display the default error page.
After setting the content template for this Access Group, the 404 content template is correctly used. Check this screenshot hidden link
I hope this helps. Let me know if you have any questions.
My issue is resolved now. Thanks a lot!