Forum Replies Created

Viewing 15 replies - 16 through 30 (of 779 total)
  • Plugin Author Kevin Vess

    (@kevinvess)

    Hi– thanks for using Force Login!

    Force Login is built to work with the default WordPress login, lost-password, and registration screens; for example:

    /wp-login.php?action=register

    /wp-login.php?action=rp&key=XXXXXXXXXXXXXXX&login=admin

    If your site is using a custom registration and activation URL, you will need to use Force Login’s?bypass filter?to allow public access to those custom URLs.

    Good luck!

    Plugin Author Kevin Vess

    (@kevinvess)

    Hi– thanks for using Force Login!

    Is your custom bypass code still in your theme’s functions.php file? If you update your theme, you can lose any custom changes made to it.

    Also check for any plugin conflicts by disabling other plugins and testing.

    Good luck!

    Plugin Author Kevin Vess

    (@kevinvess)

    Hi– thanks for using Force Login!

    First, you’ll need the following example script to bypass Force Login and make an exception for your landing page:

    /**
     * Bypass Force Login to allow for exceptions.
     *
     * @param bool $bypass Whether to disable Force Login. Default false.
     * @return bool
     */
    function my_forcelogin_bypass( $bypass ) {
    
      // Allow 'My Landing Page' to be publicly accessible
      if ( is_page('landing-page') ) {
        $bypass = true;
      }
    
      return $bypass;
    }
    add_filter( 'v_forcelogin_bypass', 'my_forcelogin_bypass' );

    Set the 'landing-page' string in is_page() to be your landing page slug or ID.

    The rest of my advice is outside the scope of this plugin. I recommend you hire a developer to help you customize this for you.

    Next, you may use the login_url filter to change what page WordPress links to for the login URL. The code example you shared should work, just set the site_url() to the custom login page you want.

    Good luck!

    Plugin Author Kevin Vess

    (@kevinvess)

    Hi– thanks for using Force Login!

    What happens if you disable all other plugins and switch to a default WordPress theme? Make sure another plugin or your theme isn’t causing a conflict with Force Login.

    Also, make sure is_page('404') is the condition you need to bypass. You might need to use the is_404() condition instead. However, this would allow public access to your 404 page, if that’s your goal.

    I suspect something in your theme or another plugin is causing a conflict with Force Login, resulting in a redirect loop. You’ll need to run some tests to determine where the conflict is to fix it.

    Thanks, good luck!

    Plugin Author Kevin Vess

    (@kevinvess)

    Hi– thanks for using Force Login!

    Unfortunately, your question is not related to the Force Login plugin. The screen you’re asking about is part of core WordPress.

    Good luck!

    Plugin Author Kevin Vess

    (@kevinvess)

    Hi, thanks for using Force Login!

    It looks like you’re on the correct path to customizing Force Login to suit your needs. Unfortunately, I can’t help troubleshoot your custom code.

    With that being said, are you sure the cookie is being set for the entire site or just the initial page you visit with the query string? For example:

    setcookie("BypassCookie", 'yes', time()+3600, '/');
    Forum: Plugins
    In reply to: [Force Login] REST API user
    Plugin Author Kevin Vess

    (@kevinvess)

    Hi, I’m glad you got it working!

    Your other problem, the error message you shared, is not part of Force Login. You’ll need to contact the support team for the Mapster WP Maps plugin to resolve that issue.

    Thanks!

    Forum: Plugins
    In reply to: [Force Login] REST API user
    Plugin Author Kevin Vess

    (@kevinvess)

    Hi, thanks for using Force Login!

    Force Login uses the?rest_authentication_errors?filter to check for REST API authentication. If no authentication is used, it blocks the request.

    You can either disable our filter function or hook into it yourself to allow the specific endpoint to be accessed without authentication.

    Check out this related support thread:
    https://www.ads-software.com/support/topic/bypassing-only-specific-rest-endpoint/

    And:
    https://www.ads-software.com/support/topic/exception-for-api/

    Thanks!

    Thread Starter Kevin Vess

    (@kevinvess)

    @d0153

    I can try testing for a conflict, but don’t you think you should adjust the plugin code to handle a scenario where the admin_footer_text_settings() method might be sent a NULL value and it doesn’t result in a fatal error?

    Plugin Author Kevin Vess

    (@kevinvess)

    Hi, thanks for using Force Login!

    I’m not sure what would cause the /events page, that The Events Calendar generates, to not work.

    Does your /events page work properly with Force Login disabled?

    Force Login uses the template_redirect hook to process the redirect to the login screen before the page/post is loaded. If there is a conflict with The Events Calendar plugin, it would exist there.

    Let me know if you solve this issue, in case someone else has a similar experience. Thanks!

    Thread Starter Kevin Vess

    (@kevinvess)

    We’re using WordPress 6.1.1, Version 6.0.13.1 of The Events Calendar plugin, and PHP 8.0.

    This fatal error is happening on every page of the admin panel, but we first noticed it while an Author was trying to access the Medial Library.

    I believe the issue is that non-Administrators using the admin panel experience different footer text. Although your method requiring the footer text value to be a string works for an admin, it doesn’t work for non-Admins when the footer text is NULL.

    So, the simplest solution to me is to not require that value to be a string and allow NULL/empty values to be returned.

    Thanks,
    Kevin

    • This reply was modified 1 year, 6 months ago by Kevin Vess. Reason: Added PHP version to details
    Thread Starter Kevin Vess

    (@kevinvess)

    It appears the issue is the following method requires the returned value to be a string:

    public function admin_footer_text_settings( $footer_text ): string {

    If I remove the type declaration and change that line to this instead, it stops throwing the fatal error and the admin pages work properly:

    public function admin_footer_text_settings( $footer_text ) {

    Hopefully you can apply this fix quickly to the next release.

    Thanks!
    Kevin

    Thread Starter Kevin Vess

    (@kevinvess)

    Upon further investigation, it appears this fatal error is happening to all user roles below Administrator.

    Plugin Author Kevin Vess

    (@kevinvess)

    Force Login uses the template_redirect hook to process the redirect to the login screen before the page/post is loaded.

    If you’re comfortable writing code, I recommend adding your own conditional logic to that action hook to redirect visits to the login screen. Feel free to use my plugin as an example of how to do it.

    Good luck!

    Plugin Author Kevin Vess

    (@kevinvess)

    Hi, I’m so glad you love my plugin! ??

    As you know, Force Login makes the entire site private with the ability to filter some pages to be publicly accessible. What you’re asking for is the inverse of what this plugin does.

    WordPress already comes with a feature to make specific pages “Private” or “Password protected” –?I recommend you use those settings to protect a single page.

    https://make.www.ads-software.com/support/user-manual/pages/page-visibility/

    Be sure to rate and review my plugin to let others know how you like it.

    Thanks for using Force Login!

Viewing 15 replies - 16 through 30 (of 779 total)