[CoursePress Pro] Student Login popup not working

Hello superheroes,

We're encountering a strange problem with Coursepress Pro. If a student clicks on the 'signup and enroll' button on the course overview page, the login panel that pops up doesn't work and gives an invalid password error every time.

I've deactivated the plugins likely to cause a conflict but it still doesn't work – it's very strange.

Ideally, we'd like to replace this popup with our own custom login / registration form – I found an old snippet of code posted in response to another question but unfortunately this caused an infinite loop in which the user was constantly redirected back to the course information page if they were already logged in.

If you can suggest a method of how we can either fix the login panel or replace it with our own we'd be most grateful!

Thanks in advance for all your help!

  • Predrag Dubajic
    • Support

    Hi Martin,

    Hope you’re doing well.

    I see that you have some kind of additional form on your site, that opens in the bottom right corner.

    It’s possible that these input fields are being checked as well and since they are empty the verification fails.

    Can you try disabling this so we can see if that’s indeed what’s causing it?

    Also, could you tell me which code snippet were you trying out?

    Best regards,

    Predrag

  • Martin
    • WPMU DEV Initiate

    Hi Predrag,

    Ah yes, I’ve seen that little thing so many times I keep overlooking it. It’s part of Registration Magic plugin which we’re using to create a custom registration form. I tried deactivating it and testing the login form again and it still didn’t quite work. I have deactivated it again for you now :slight_smile:

    And of course – I stupidly deleted the snippet because it wasn’t quite working and forgot to save a backup.

    I believe it may have been the following (inserted into functions.php)

    function add_custom_scripts(){ ?>

    <style type=”text/css”>

    .cp-popup-window-cp-popup-overall-hide {

    display: none !important;

    }

    body .cp_blur{

    -webkit-filter: blur(0px);

    -moz-filter: blur(0px);

    -o-filter: blur(0px);

    -ms-filter: blur(0px);

    filter: blur(0px);

    }

    </style>

    <script type=”text/javascript”>

    jQuery(document).ready(function(){

    jQuery( ‘.cp_popup_window, .cp_popup_overall’ ).addClass(‘cp-popup-window-cp-popup-overall-hide’:wink:;

    /* Signup redirection */

    jQuery( ‘button.apply-button.signup’ ).on( ‘click’, function( e ) {

    e.preventDefault();

    e.stopPropagation();

    window.location = “<?php echo wp_registration_url(); ?>”;

    } );

    });

    </script>

    <?php }

    add_action(‘wp_footer’, ‘add_custom_scripts’:wink:;

    But I can’t be entirely sure. I’ll add the code again and see if the issue returns…

    Thanks so much again!

  • Predrag Dubajic
    • Support

    Hi Martin,

    The issue is still there but I did pinpoint the issue, it’s actually the login popup that opens from Login link in your menu bar.

    When I inspected your page and removed tie-popup-login element completely and then fired up CoursePress login it worked fine.

    So it’s pretty much the thing I mentioned above, there are two login fields on the page and when CoursePress checks values entered in input fields it checks those other ones as well, and since they are empty the check fails and you’re unable to login.

    Can you tell me how this popup login form is added, is that part of your theme, some plugin you are using, or custom developed for your site?

    Best regards,

    Predrag

  • Martin
    • WPMU DEV Initiate

    Hi Predrag,

    Apologies for the delay in responding. Been a busy week here.

    The login popup is part of the theme, as far as I know. I can certainly attempt to disable it but it is useful having a login popup there as eventually the site will encompass more than just our LMS :slight_smile:

    Thanks for all your help so far!

  • Predrag Dubajic
    • Support

    Hi Martin,

    I’ve managed to get a hold of an older version of the theme you are using and I was able to replicate the issue as well.

    And indeed the login input field checkup is checking the fields from the theme as well.

    I have created a report for our developers so they can see if we can change the login verification in future versions so it skips other fields that are loaded on the page.

    Best regards,

    Predrag

  • Martin
    • WPMU DEV Initiate

    Thanks Predrag, I really appreciate your diagnosis of the issue. For now, I’m directing the login link on the top right to the actual login page rather than loading the modal window as before.

    Top support as always. Very much appreciated!

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.