• Resolved akafaust

    (@akafaust)


    I have a problem with pop-ups on IE/EDGE

    Here are three links to pop-ups, and they do not work without an open console.
    Learn About Membership Levels: Active | Retired | College Student

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

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hello,

    I’m experiencing the same.
    In my case, Chrome and Microsoft Edge work fine.
    Its just IE11 that fails to “pop-up”.

    EI Verion: 11.285.17134.0
    OS: Windows 10
    Plugin version: 1.2.1
    Divi Plugin: 2.15
    Divi Theme: 3.15

    Very strange! I refreshed the page with the dev tools open and it works!
    Load without dev tools and its broken! Doesn’t make it easy . . .

    The site exhibiting the behavior is:
    https://concisecapital.com/team-members/

    Please let me know if there is any additional debug information that I can provide. Thank you for this wonderful plugin!

    I forgot to mention:

    I’m running PHP 7.1, no idea if its related, sadly not a PHP guy.

    Found an explanation for why IE works with the debug open and otherwise fails:

    From this StackOverflow entry:

    The experience you’re describing is typical of code which contain console.log() or any of the other console functionality.

    The console object is only activated when the Dev Toolbar is opened. Prior to that, calling the console object will result in it being reported as undefined. After the toolbar has been opened, the console will exist (even if the toolbar is subsequently closed), so your console calls will then work.

    There are a few solutions to this:

    The most obvious one is to go through your code removing references to console. You shouldn’t be leaving stuff like that in production code anyway.

    If you want to keep the console references, you could wrap them in an if() statement, or some other conditional which checks whether the console object exists before trying to call it.

    Another poster included a java script override for browsers that don’t support console:

    https://github.com/h5bp/html5-boilerplate/blob/master/src/js/plugins.js

    Hmmm no luck on stripping the comment code.
    I still see the pop-up logging in console and of course, same broken behavior from IE.
    ??

    I tried (and failed) to add a the following in a Divi code block….
    Note: IE apparently doesn’t like $(window).load(), so using window.onload.

    <script>
    // Avoid <code>console</code> errors in browsers that lack a console. 
    window.onload = function() { 
        //Running this for IE only.  
        if!((navigator.userAgent.indexOf("MSIE") != -1 ) || (!!document.documentMode == true ))
    		return;
    
        var method; 
        var noop = function () {}; 
        var methods = [ 
          'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error', 
          'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log', 
          'markTimeline', 'profile', 'profileEnd', 'table', 'time', 'timeEnd', 
          'timeline', 'timelineEnd', 'timeStamp', 'trace', 'warn' 
        ]; 
        var length = methods.length; 
        var console = (window.console = window.console || {}); 
    	
        while (length--) { 
          method = methods[length]; 
    
          // Only stub undefined methods. 
          if (!console[method]) { 
            console[method] = noop; 
          } 
        } 
      }; 
    </script>

    Any JavaScript gurus out there that can help?
    Hi @strackerphil-1 any chance you can add an IE11 code path?

    Thread Starter akafaust

    (@akafaust)

    onlyontues (@onlyontues), thank you for your help))
    I resolved it by disabling debug in include/class-evr-divi-popup.php on line 202

    Thanks @akafaust!

    Will this survive updates?

    Do I perform this via FTP or is there a safer “WordPress” way to accomplish this? (Sorry, WordPress neophyte.)

    Plugin Contributor Philipp Stracker

    (@strackerphil-1)

    @akafaust and @onlyontues, in the recent releases the debug option is disabled by default. This issue should not arise again.

    Thanks for reporting, Philipp ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Popup not working on IE/Edge? Again?’ is closed to new replies.