• Resolved dscreative

    (@dscreative)


    Thanks for the excellent plugin. We are having an issue with it since an update to the Events Manager plugin (https://ww.wp.xz.cn/plugins/events-manager/). I’ve been arguing with them for weeks about how it is definitely their plugin causing the problem, but I wanted to see if you had any ideas about how to solve this, as you seem more helpful than they are!!

    Since their last update, the Login popup just doesn’t work. To confirm it is just a conflict between the two plugins, I’ve set up a test site at https://events.ds-test.co.uk/. The homepage there has both Events Manager and the OTP login plugin active, but if you click the Login button, nothing happens. On the Sample Page (https://events.ds-test.co.uk/sample-page/) I have used a plugin manager to disable Events Manager on that page only, and then the Login link works.

    Events Manager support said in one post that:

    “I think the reason this problem occurs is because the OTP Login plugin is using inline JavaScript instead of using the proper method of enqueuing the JavaScript with a dependency on jQuery. See the following for an example: https://developer.ww.wp.xz.cn/reference/functions/wp_enqueue_script/#comment-content-276

    I pointed out that this problem only occured when their plugin was active, and only since their last update, but we haven’t really got any further. Do you have any idea what could be causing the problem here?

    Thanks for your help!

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi @pressonforlife. This problem can be fixed by changing email-otp-authenticator.php starting at line 457.

    Change this:

                wp_enqueue_script( "emailotpauthn-inlinehdscript" ); //Rating-Request
    wp_add_inline_script("emailotpauthn-inlinehdscript", $emailotpauthnhdscript); //Rating-Request

    To this:

                wp_enqueue_script( "jquery" ); //Rating-Request
    wp_add_inline_script("jquery", $emailotpauthnhdscript); //Rating-Request

    This will make sure that the jquery script is loaded and specifies that the inline script depends on jquery.

    My previous changes didn’t fix the problem. Instead make the following changes to the file wp-content/plugins/email-otp-authenticator/lib/emailotpauthn-external-class.php

    174c174
    < $emailotpauthnextrnlscript = 'var $ = jQuery;
    ---
    > $emailotpauthnextrnlscript = '
    180c180
    < jQuery(document).ready(function() {
    ---
    > jQuery(document).ready(function($) {
    616c616
    < jQuery(document).ready(function() {
    ---
    > jQuery(document).ready(function($) {
    672c672
    < }
    ---
    > });

    Here’s the corrected version of the diff:

    174c174
    < $emailotpauthnextrnlscript = 'var $ = jQuery;
    ---
    > $emailotpauthnextrnlscript = '
    180c180
    < jQuery(document).ready(function() {
    ---
    > jQuery(document).ready(function($) {
    615a616
    > jQuery(document).ready(function($) {
    670a672
    > });

    The following line was added after line 615:

                    jQuery(document).ready(function($) {

    After adding the above line the following was added after line 671:

                    });
    • This reply was modified 9 months, 2 weeks ago by joneiseman.
    Thread Starter dscreative

    (@dscreative)

    That’s fixed it, many thanks for the help! I hope the author of this plugin can include this fix in the next update, as well as addressing the security vulnerabilities that another user has mentioned.

    Thread Starter dscreative

    (@dscreative)

    Sadly, on further testing, it turns out that this has not resolved the problem properly. Now, the pop up appears, but the OTP code that is sent to the email address entered does not work. It just says ‘Invalid OTP’ every time.

    Plugin Author Chandan Shrivastava

    (@ilvchandan)

    Your all issues are resolved in the version 6.3.2 and above.
    Please update the plugin, and activate the vanilla javascript under general settings.

    Regards,
    The developer.

    Thread Starter dscreative

    (@dscreative)

    That’s great, thanks for sorting this. It seems to be working correctly again now.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Issues with Events Manager Plugin’ is closed to new replies.