1. Kayako Download customers: we will continue to develop and support Kayako Download beyond July 2017, alongside the new Kayako for existing customers.

    Find out more.

  2. The forum you are viewing relates to Kayako Classic. If you signed up or upgraded to the new Kayako (after the 4th July 2016), the information in this thread may not apply to you. You can visit the forums for the new Kayako here.

v.4.92.6 - User Consent does not update

Discussion in 'Using Kayako Classic' started by jeffshead, Feb 16, 2019.

  1. jeffshead

    jeffshead Established Member

    It seems the new user consent system does not update the database when a logged in user clicks on the "I Agree" button.

    The same pop-up, depicted in the image below, displays on every page the user visits regardless if he has already clicked the button.

    [​IMG]

    This is a very annoying problem if you rely on loginshare.
     
  2. jeffshead

    jeffshead Established Member

    Below is the code in the General->Footer template that is responsible for updating the database but it does not appear to work:

    PHP:
    <script type="text/javascript">
                $(function() {
                    $(
    '#i-agree-consent').on('click', function(e) {
                        
    e.preventDefault();
                        
    document.cookie "SWIFT_prconsenturl="+window.location.href;
                        $.
    ajax({
                            
    type"POST",
                            
    url"<{$_baseName}><{$_templateGroupPrefix}>/Base/User/UpdateProcessingConsentAJAX",
                            
    data: $('form.processconsentform').serialize(),
                            
    success: function(response) {
                                
    jQuery("#checkoffscreen").dialog("destroy");
                            }
                        });
                        return 
    false;
                    });
                });
            
    </script>
            <!-- BEGIN MODAL FOR YET TO BE CAPTURED CONSENT LOGGEDIN USER -->
                   <div style="display:none" id="checkoffscreen" class="innerwrapper">
                           <form enctype="multipart/form-data" name="processconsentform" autocomplete="off">
                                <div>
                                    <p><{$_language[regpolicytext]}> <a href="<{$_registrationPolicyURL}>" target="_blank"> <{$_language[regpolicyurl]}> </a></p>
                                    <input name ="processconsent" type="hidden" value="I Agree">
                                </div>
                                <div>
                                    <input id="i-agree-consent" type="submit" class="rebuttonwide2" value="<{$_language[cookiepolicyagreement]}>">
                                </div>
                </form>
            </div>
    If I add "alert(response);" to " success: function(response) {", the alert is blank.


    The only entries I see in the swuserconsents table are those that came from the "create a ticket" and "leave a chat message" forms.
     
    Last edited: Feb 17, 2019
  3. jeffshead

    jeffshead Established Member

    Found the issue... The web application firewall was blocking unsigned cookies. The cookie for this is generated by JavaScript so it cannot be signed. Had to create an exception for the consent cookie.
     

Share This Page