WPFront
  • Home
  • Plugins
    • Notification Bar Plugin
      • Plugin Ideas
      • Plugin Settings
      • Plugin FAQ
    • Scroll Top Plugin
      • Plugin Settings
      • Plugin FAQ
    • User Role Editor Plugin
      • Plugin Documentation
      • Plugin Settings
      • Plugin FAQ
    • Paddle Gateway Plugin
  • Go Pro
  • Support
    • Documentation
    • FAQ
  • Affiliates
  • Contact
  • Login
  • Cart

Tagged: 404, permissions, redirect

  • This topic has 3 replies, 2 voices, and was last updated 10 years ago by Syam Mohan.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • May 2, 2015 at 4:20 pm #8602
    Mitch Canton
    Participant

    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 #8603
    Syam Mohan
    Keymaster

    Hi 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 #8604
    Mitch Canton
    Participant

    Hey 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 #8607
    Syam Mohan
    Keymaster

    Hi Mitch,

    You are right. With bbPress its impossible to use the shortcodes. I’ll check the feasibility of a solution with redirection.

    Thanks

    Syam

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘404 redirect issue’ is closed to new replies.
Log In
Lost Password

Search Topics

Documentation

FAQ
Roles List Add Role Edit Role Delete Role Restore Role Add or Remove Capability Assign/Migrate Users Posts/Pages Extended Permissions Custom Post Type Permissions Navigation Menu Permissions Widget Permissions Admin Menu Editor Media/Attachment File Permissions User Level Permissions Content Restriction Shortcodes Login Redirect Export Roles Import Roles Bulk Edit Settings Multisite Roles List Multisite Add New Role Multisite Edit Role Multisite Delete Role Multisite Restore Role Multisite Sync Roles Multisite Settings WordPress Capabilities Actions and Filters Installation Instructions