Reply to thread

During "Two-step verification setup", if the JavaScript variable $ is not used by jQuery but by something else then no QR code is shown and the error "TypeError: $el.qrcode is not a function" is logged in the browser console.


This can be fixed by modifying the template "two_step_totp" as follows:

[CODE=diff]--- two_step_totp.tpl    2018-03-05 13:38:28.260078805 +0100

+++ two_step_totp.tpl    2018-03-05 13:38:40.366005709 +0100

@@ -6,9 +6,9 @@

         {{ phrase('totp_enter_secret_into_app_x', {'secret': $secret}) }}

     </xf:formrow>

     <xf:js>

-    $(function()

+    jQuery(function()

     {

-        var $el = $('#js-totpQrCode');

+        var $el = jQuery('#js-totpQrCode');

         $el.qrcode({

             text: '{$otpUrl|escape('js')}'

         });

[/CODE]


Back
Top Bottom