• Resolved amityweb

    (@amityweb)


    We get this error below when clicking links when your plugin is enabled, and your plugin does not work:

    frontend.js?ver=1.4.3:4 Uncaught TypeError: Cannot read property ‘length’ of undefined
    at HTMLDocument.exit_notifier_leave_now (frontend.js?ver=1.4.3:4)
    at HTMLDocument.dispatch (jquery.js?ver=1.12.4:3)
    at HTMLDocument.r.handle (jquery.js?ver=1.12.4:3)

    Have disabled it in the meantime

    We have PHP7 installed.

    Here are all the plugins installed (its not Autoptimize or WP Rocket as I tested it with those disabled):

    +———————————————-+———-+———–+———+
    | name | status | update | version |
    +———————————————-+———-+———–+———+
    | acf-content-analysis-for-yoast-seo | active | none | 2.0.1 |
    | aryo-activity-log | active | none | 2.4.1 |
    | codepress-admin-columns | active | none | 3.1.10 |
    | advanced-custom-fields-pro | active | none | 5.6.10 |
    | advanced-woo-search | active | none | 1.41 |
    | malinky-ajax-pagination | active | none | 2.0.1 |
    | akismet | active | none | 4.0.3 |
    | autoptimize | active | none | 2.3.4 |
    | backupbuddy | active | available | 8.1.0.1 |
    | taxonomy-terms-order | active | none | 1.5.3.2 |
    | contact-form-7 | active | none | 5.0.2 |
    | contact-form-7-infusionsoft-add-on | active | none | 1.2.2 |
    | uk-cookie-consent | active | none | 2.3.10 |
    | duplicate-post | active | none | 3.2.2 |
    | eventbrite-api | active | none | 1.0.12 |
    | exit-notifier | inactive | none | 1.4.3 |
    | fg-magento-to-woocommerce-premium | active | none | 2.38.0 |
    | gift-aid-for-woocommerce | active | none | 1.3.5 |
    | give | active | none | 2.1.2 |
    | give-email-reports | active | none | 1.1.1 |
    | give-gift-aid | active | none | 1.1.2 |
    | give-paypal-pro | active | none | 1.1.5 |
    | give-stripe | active | none | 2.0.3 |
    | google-analytics-for-wordpress | active | none | 7.0.6 |
    | gravityforms | active | none | 2.3.2 |
    | infusionsoft | active | none | 1.5.12 |
    | iwp-client | active | none | 1.8.1 |
    | better-wp-security | active | none | 6.9.2 |
    | jetpack | active | none | 6.1.1 |
    | keyring | active | none | 1.9 |
    | mailchimp-for-wp | active | none | 4.2.2 |
    | mc4wp-premium | active | none | 3.1.5 |
    | optinmonster | active | none | 1.3.5 |
    | php-code-widget | active | none | 2.3 |
    | ppress | active | none | 1.5.3 |
    | really-simple-captcha | active | none | 2.0.1 |
    | redirection | active | none | 3.2 |
    | regenerate-thumbnails | active | none | 3.0.2 |
    | relevanssi | active | none | 4.0.9 |
    | search-exclude | active | none | 1.2.2 |
    | searchwp | active | available | 2.8.15 |
    | searchwp-term-synonyms | active | available | 2.4.11 |
    | searchwp-woocommerce | active | available | 1.1.17 |
    | shortcode-ui | active | none | 0.7.3 |
    | sql-executioner | active | none | 1.4 |
    | tinymce-advanced | active | none | 4.7.11 |
    | user-switching | active | none | 1.3.0 |
    | woocommerce | active | available | 3.3.5 |
    | woocommerce_donations_on_cart | active | none | 1.91 |
    | woocommerce-gateway-stripe | active | none | 4.1.4 |
    | woocommerce-table-rate-shipping | active | none | 3.0.7 |
    | wordfence | active | none | 7.1.6 |
    | wordpress-importer | active | none | 0.6.4 |
    | wp-optimize | active | none | 2.2.4 |
    | wp-all-export | active | none | 1.2.0 |
    | wp-all-import | active | none | 3.4.8 |
    | wp-migrate-db | active | none | 1.0.2 |
    | wp-rocket | active | none | 3.0.4 |
    | wp-store-locator | active | none | 2.2.14 |
    | yith-woocommerce-ajax-product-filter-premium | active | available | 3.4.7 |
    | wordpress-seo | active | none | 7.5.1 |
    | wp-migrate-db-pro-compatibility | must-use | none | 1.1 |
    | advanced-cache.php | dropin | none | |
    +———————————————-+———-+———–+———+

    P.S. I think your http://cvstech.com/ site was hacked. It redirected me to a page with popups, and now gives a 500 error.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Curtis V. Schleich

    (@cvscvstechcom)

    Thanks for the heads up on the site! I’ll get that fixed ASAP.

    As for the error, try enabling the plugin, then go to the settings page and save. If that doesn’t fix it, you can email me directly with the URL of the site and I’ll take a look at the console to see if I can find out what’s going on.

    Thread Starter amityweb

    (@amityweb)

    Thanks. I tried that, but still get the error.

    I cannot leave it enabled, because when we went live with the site so many other JS functions broke, although it did not beak earlier when I re-enabled but am still concerned about leaving it just in case.

    So here is some further info that may help.

    The line where the error occurs is here (this is taken from my autoptimised combined minified file):

    function exit_notifier_leave_now(event){var urlsnippet=event.currentTarget.href;if(ExitBoxSettings.Include_URL===’on’){if(event.currentTarget.href.length>40){urlsnippet=event.currentTarget.href.substr(0,40)+”…”;}}

    I assume it means it cannot read that property length of event.currentTarget.href? So maybe a problem with the event?

    Thanks

    Plugin Author Curtis V. Schleich

    (@cvscvstechcom)

    Hello, @amityweb! Any progress on this issue? I’ve been away on vacation for a while and wanted to get you followed up.

    To clarify, enabling my plugin caused javascript errors in other places too?

    Thread Starter amityweb

    (@amityweb)

    No, we dont have it enabled, we have it as a task to look at still. They want an exit notifier but it caused errors.

    Plugin Author Curtis V. Schleich

    (@cvscvstechcom)

    Can we schedule a time to look at it together?

    Plugin Author Curtis V. Schleich

    (@cvscvstechcom)

    Hello again @amityweb. Do please let me know if I can help any further.

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

The topic ‘JS error with exit notifier’ is closed to new replies.