• Hi,
    I have installed mDocs on a site that has a number of modal windows, but these stop working when mDocs is activated. If you click on “Login” or “Donate” or any of the others, the modal pops up briefly then disappears. The fault goes away if I deactivate mDocs.

    The console shows no JS errors.
    I have checked all the “Disable Third Party Includes” but no change in behaviour.
    Please could you suggest how I can narrow this down further?
    Thanks,
    Phil.

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

Viewing 15 replies - 1 through 15 (of 18 total)
  • Plugin Author bhaldie

    (@bhaldie)

    its more than likely a css issue with your theme and mDocs. IF the theme is free I can have a look at it and see what I can find

    Please send me the link to the theme.

    Thread Starter carryoncoding

    (@carryoncoding)

    Thanks for your kind offer. The site is currently switched to Twenty-twenty theme and the problem persists. I have tried Twenty-seventeen and the problem is visible there too.

    The original theme is Kadence Virtue Premium.

    Kind regards,
    Phil.

    Plugin Author bhaldie

    (@bhaldie)

    hmm try disabling plugins as well. And see which one might be in conflict with mDocs.

    Thread Starter carryoncoding

    (@carryoncoding)

    On the dev site (the address given above), when I disable “Custom Facebook Feed Pro Business” by Smash Balloon, the problem goes away.

    On the Live site, the problem remains, suggesting there is another plugin causing a conflict. But let’s resolve this on the Dev site first and maybe the fix will sort things out on the Live suite too?

    Thanks,
    Phil.

    Plugin Author bhaldie

    (@bhaldie)

    unfortunately that is a payed plugin. I have no way of debugging it. I would suggest contacting them and see what they can do to help.

    Thread Starter carryoncoding

    (@carryoncoding)

    Hi, we have progress!

    Smash Balloon have done some extensive testing and found that the problem is due to when the jQuery library is loaded. In brief, mDocs doesn’t like the jQuery library loaded before it.

    Should I share the findings here or is there a better way to copy stuff to you?
    Kind regards,
    Phil.

    Plugin Author bhaldie

    (@bhaldie)

    you can stop mDocs from loading Jquery if you goto Options > Settings > Disable third party applications.

    try that and see if it works.

    Thread Starter carryoncoding

    (@carryoncoding)

    Thanks. I tried disabling the “3rd-party includes” in my first post above. I have tried it again in case anything has changed, but no difference.

    Here is the commentary from the team investigating the problem:

    The issue is related to the order in which the jQuery JavaScript library and the JavaScript file from the Memphis Docs plugin you are using are loaded into the page. When we register the JavaScript file in our plugin then we declare any dependencies that the file has, which in our case is jQuery – a very widely used JavaScript framework. We register this in the recommended way:

    wp_register_script( 'cffscripts', plugins_url( '/js/cff-scripts'.$cff_min.'.js' , __FILE__ ), array('jquery'), CFFVER, true );

    Doing this, loads the jQuery file before any other JavaScript files are loaded into the page (screenshot1). The issue seems to be here that the Memphis Docs plugin doesn’t like that the jQuery library is being loaded before its JavaScript file. When our plugin is deactivated then the jQuery file is loaded further down the page, after the Memphis Docs JavaScript file, and so doesn’t cause this issue (screenshot2). You can see the Memphis Docs JavaScript file immediately above the jQuery library in that screenshot.

    I am not sure why the Memphis Docs JavaScript file would cause this issue when jQuery is loaded before it on the page. Ideally, the long term solution would be for that plugin developer to fix that issue as the same problem could happen for any number of other people using that plugin.

    Plugin Author bhaldie

    (@bhaldie)

    one thing we can try is editing the file mdocs-settings.php line 203:

    
    wp_enqueue_script('memphis-documents.js', MDOCS_URL.'/'.$mdocs_js, array(), MDOCS_SESSION_ID );
    

    and change it to this:

    
    wp_enqueue_script('memphis-documents.js', MDOCS_URL.'/'.$mdocs_js, array(), MDOCS_SESSION_ID, true );
    

    this will load the Memphis-documents.js script in the footer.

    • This reply was modified 4 years, 9 months ago by bhaldie.
    Thread Starter carryoncoding

    (@carryoncoding)

    Tried that mod but no change in behaviour.
    I’ve left the mod in place for the time being.

    Plugin Author bhaldie

    (@bhaldie)

    try adding the true value to all wp_enqueue_script in that file. this will load all javascript last.

    Thread Starter carryoncoding

    (@carryoncoding)

    Thanks.
    I think I got them all.
    No change in behaviour.

    Plugin Author bhaldie

    (@bhaldie)

    well ill have to look more into it, the developers comments do not line up. mDocs is loading last and the problem is still around…

    Please give me some time it see if there can be fixed.

    Thread Starter carryoncoding

    (@carryoncoding)

    Thanks. I’ll leave those mods in place in case you want to look.

    Thread Starter carryoncoding

    (@carryoncoding)

    Happy to set you up as an admin on this dev site but can’t see how to mark a message as “private”.

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘mDocs conflict with modal windows’ is closed to new replies.