• Resolved anmolrajdev

    (@anmolrajdev)


    I tried installing the plugin on my website: http://mindstepsinc.om When I enable the plugin popup from “Display Settings”, I receive the following error in firebug.

    TypeError: invalid ‘in’ operand e
    …tml”).on(“click”,r.open_trigger,function(e){if(e.target!==this)return;p(r);retur… (line 59) which is the script that the plugin adds:

    <script type="text/javascript">jQuery(document).ready(function(e){function i(t){args=l(e(t).html());var n=new Object;n.checking=false;n.previousY=-1;n.open_trigger=f(args,"open-trigger","");n.close_trigger=f(args,"close-trigger","");n.timed_popup_delay=f(args,"timed-popup-delay",-1);n.enable_exit_intent=f(args,"enable-exit-intent-popup",false);n.enable_scroll=f(args,"enable-scroll-popup",false);n.scroll_percent=f(args,"scroll-percent",-1);n.scroll_trigger=f(args,"scroll-trigger","");n.popup_selector=f(args,"popup-selector","");n.popup_class=f(args,"popup-class","");n.cookie_duration=f(args,"cookie-duration",0);n.cookie_name=f(args,"cookie-name","");n.priority=f(args,"priority",0);return n}function s(e){if(false===r||r<e.priority){p(e);d(e.cookie_name,e.cookie_duration)}}function o(e){if(e.checking&&(false===r||r<e.priority)){p(e);d(e.cookie_name,e.cookie_duration)}e.checking=false}function u(t){if(false===r||r<t.priority){var n=e(window).scrollTop()+e(window).height(),i=e(document).height();if(t.scroll_percent>=0){if(n>i*t.scroll_percent/100){p(t)}}if(t.scroll_trigger){e(t.scroll_trigger).each(function(i,s){if(false===r||r<t.priority){var o=e(s).offset().top;if(o<n){p(t)}}})}}}function a(){var n=[];e(t).each(function(t){var r=i(this),o=v(r.cookie_name);if(o!=="1"){if(r.timed_popup_delay>=0){setTimeout(function(){s(r)},r.timed_popup_delay*1e3)}if(r.enable_exit_intent){e(document).mousemove(function(e){c(e,r)})}if(r.enable_scroll&&(r.scroll_percent>=0||r.scroll_trigger)){e(window).on("scroll",function(e){u(r)})}}if(r.open_trigger){e("html").on("click",r.open_trigger,function(e){if(e.target!==this)return;p(r);return false})}if(r.close_trigger){e("html").on("click",r.close_trigger,function(e){if(e.target!==this)return;h(r);return false})}n.push(r)});e(document).keyup(function(e){if(e.keyCode!=27)return;for(var t=0;t<n.length;t++){h(n[t])}return false})}function f(e,t,n){var r=null;if(t in e){r=e[t];if(typeof n=="boolean"){return r=="true"}if(typeof n=="number"){return parseInt(r)}return r}return n}function l(e){var t=jQuery.parseJSON(e),n=null;for(n in t){if("string"===typeof t[n]){t[n]=t[n].replace(/&quot;/g,'"');t[n]=t[n].replace(/'/g,"'");t[n]=t[n].replace(/</g,"<");t[n]=t[n].replace(/>/g,">");t[n]=t[n].replace(/&/g,"&")}}return t}function c(e,t){if(t.hasOpened)return;t.checking=false;if(e.clientY<t.previousY){var n=e.clientY+(e.clientY-t.previousY);if(n<=10){t.checking=true;setTimeout(function(){o(t)},1)}}t.previousY=e.clientY}function h(t){n=false;if(t.popup_selector&&t.popup_class){e(t.popup_selector).removeClass(t.popup_class)}}function p(t){r=t.priority;if(n)return;n=true;if(t.popup_selector&&t.popup_class){e(t.popup_selector).addClass(t.popup_class)}}function d(e,t){var n="",r=null;if(e){if(t!==0){r=new Date;r.setTime(r.getTime()+t*24*60*60*1e3);n="; expires="+r.toGMTString()}document.cookie=e+"=1"+n+"; path=/"}}function v(e){if(e){var t=e+"=",n=document.cookie,r=n.indexOf(t);if(r>=0){r+=t.length;endIndex=n.indexOf(";",r);if(endIndex<0)endIndex=n.length;return n.substring(r,endIndex)}}return null}var t=".popupally-configuration",n=false,r=false;a()})</script><style type="text/css">.clear {clear: both; height:0px; width: 100;}

    This also breaks the slider on the home page, the framework being used is Genesis. The site has been coded by some other developer and I am not sure if I should update WordPress or the plugins..

    Any thoughts why the plugin gives me this error?

    Thanks in advance!

    Anmol

    https://wordpress.org/plugins/popupally/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi Anmol,

    That is an error we have never seen before. It could be due to interaction with existing scripts, but we cannot be certain without more data.

    If it is not too much trouble, could you please
    1. Create a new page for testing
    2. Enable the popup just for that page
    3. Post the link to the test page or send to info@nathalielussier.com

    We will get it resolved as soon as possible!

    Robin

    Hi Anmol,

    The error is likely caused by the server running an old version of PHP. You should contact your hosting support to have it updated. I would recommend getting on Live Chat (if available) with support and ask them:
    1. What version of PHP is the WordPress installation currently running
    2. If the number is lower than 5.3, ask them to update it to 5.3 or 5.4
    After that is done, PopupAlly should work properly. Unfortunately, it is unrealistic for us to retro-fit the plugin for all versions of PHP, so I have to suggest you to update your server. As a side benefit, there will be small performance increase once the PHP update is done.

    Robin

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

The topic ‘Plugin not working: Javascript TypeError in Firebug console’ is closed to new replies.