Forum Replies Created

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • in reply to: AJAX Login not working with CACHE #67825
     jmot
    Participant

    The login is failing, but it’s successfully returning a response.

    Attachments:
    You must be logged in to view attached files.
    in reply to: AJAX Login not working with CACHE #67823
     jmot
    Participant

    There is no redirect loop.

    The submit function was being called continuously. It no longer is, because I commented it out.

    Is there a reason for the $(“#login_form”).submit();?

    in reply to: AJAX Login not working with CACHE #67821
     jmot
    Participant

    Found the issue. In app.js (line 1237) the kleoAjaxLogin function is calling $(‘#login_form’).submit() on error. It gets stuck in a loop and never replaces the html of #kleo-login-result.

    COPY CODE
    kleoAjaxLogin: function () {
            $('form#login_form').on('submit', function (e) {
                $('#kleo-login-result').show().html(kleoFramework.loadingmessage);
                $.ajax({
                    type: 'POST',
                    dataType: 'json',
                    url: kleoFramework.loginUrl,
                    data: {
                        action: 'kleoajaxlogin',
                        log: $('form#login_form #username').val(),
                        pwd: $('form#login_form #password').val(),
                        remember: ($('form#login_form #rememberme').is(':checked') ? true : false),
                        security: $('form#login_form #security').val()
                    },
                    success: function (data) {
                    	console.log(data);
                        $('#kleo-login-result').html(data.message);
                        if (data.loggedin == true) {
                            if (data.redirecturl == null) {
                                document.location.reload();
                            }
                            else {
                                document.location.href = data.redirecturl;
                            }
                        }
                    },
                    complete: function () {
    
                    },
                    error: function (err) {
                        // Added this. It wasn't displaying the error message.
                        $('#kleo-login-result').html(err.responseJSON.message);
                        $('form#login_form', '#login_panel').off('submit');
                        // I commmented this out. Why is this in here?
                        // $("#login_form").submit();
                    }
                });
                e.preventDefault();
            });
        }
    in reply to: AJAX Login not working with CACHE #67818
     jmot
    Participant

    EDIT TO MY PREVIOUS POST: I’ve deactivated my login related plugins and cleared my cache, but I’m still getting the errors.

    in reply to: AJAX Login not working with CACHE #67817
     jmot
    Participant

    Hi, has anyone managed to solve this. I’m getting the same error when the incorrect credentials are used. I’m showing a constant stream of 403 Forbidden errors in the console.

Viewing 5 posts - 1 through 5 (of 5 total)

Log in with your credentials

Forgot your details?