Tagged: 404, permissions, redirect
- This topic has 3 replies, 2 voices, and was last updated 9 years, 7 months ago by Syam Mohan.
-
AuthorPosts
-
May 2, 2015 at 4:20 pm #8602Mitch CantonParticipant
New user, great plugin so far.
First issue I’ve come across is that a user without the proper permissions that goes to a URL they are not allowed to visit just redirects to a 404 page.
This is really not a great situation. It would be so much better to be able to have a setting where you could set the redirect page.
In a perfect world, you would set a Global redirect page in settings, but then allow each page/post/cpt where Role Permissions were ‘enabled’ to have a URL set that would override the Global page.
This is really important on pages that are membership based, especially if you were to be charging for membership and would want to redirect to a signup page.
Please consider adding such a feature to make this work in a more user-friendly way.
Thanks.
May 2, 2015 at 7:47 pm #8603Syam MohanKeymasterHi Mitch,
Here is the challenge with that solution. Extended permissions work by adding conditions to database queries issued by WordPress, so that the post/page which the user doesn’t have permission to will be excluded from the result. Basically WordPress will act such a way that the post/page doesn’t exist within the site, hence the 404.
The solution you are asking is possible by allowing WordPress to fetch the page, but redirect or replace the content when user access the page. The replace content functionality is already there in this plugin and is called Content Shortcodes.
For your purpose I recommend using Content Shortcodes, so that paid members will see the actual content, non-paid members will see a message and guest users will see a login form.
[paid-member-role]
Post/Page content
[/paid-member-role][non-paid-member-role]
[logged-in-user]
Available only for paid members
[/logged-in-user][guest-users]
[login-form]
[/guest-users]
[/non-paid-member-role]Thanks
Syam
May 2, 2015 at 8:08 pm #8604Mitch CantonParticipantHey Syam,
Thanks for the timely reply. In some uses I think the shortcodes idea is a good one, and I saw that option here and in the docs. But my usage in this case is creating restrictions, based on extended roles, on bbpress forums (where the entire page is locked down and there is not really any content on it to wrap in the shortcode).
In multiple bbpress forums, I use Enabled role permissions to allow for specific sets of members to access specific forums. From what I can see, it would be significantly more difficult (if even possible) to do so with the shortcodes.
I guess I can create a custom 404 page which includes some widgets and manual redirect links and a registration form to go with the search and other items already there. I can make it work somehow, I just thought the custom redirect would be a nice solution (but I have an admittedly limited understanding of the specifics of the plugin workings).
Thanks for your feedback.
May 2, 2015 at 8:57 pm #8607Syam MohanKeymasterHi Mitch,
You are right. With bbPress its impossible to use the shortcodes. I’ll check the feasibility of a solution with redirection.
Thanks
Syam
-
AuthorPosts
- The topic ‘404 redirect issue’ is closed to new replies.