Support » Plugin: Highlight and Share » Javascript fragments printing in footer on front-end

  • Ron Pasillas

    (@rpasillas)


    Noticed that there is some javascript code that is showing on the front-end of our site in the footer, WP v5.5.3 and plugin v3.3.0. The problem goes away when the Enable E-mail Sharing? checkbox is checked in the settings.

Viewing 5 replies - 1 through 5 (of 5 total)
  • I’m also experiencing this on Chrome with WordPress v5.6 and plugin v3.3.6.

    For the time being, I’ve enabled Email Sharing because of @rpasillas comment above and it fixes the bug, but just wanted to let you know this is still occurring.

    Plugin Author Ronald Huereca

    (@ronalfy)

    @rpeacan @rpasillas can you please link me to a gist of the front-end output you are seeing? I can’t seem to duplicate on my end. I’d like to fix this, but I don’t know where to start.

    Thank you,

    Ronald Huereca

    I’m not able to put much together at the moment, but it was visible to me in Chrome, and it appeared to be something to do with the wp-polyfill script in the footer. Directly after it, there was a broken script tag. Here is what was in the footer when viewing source:

    <script type="text/javascript" src="https://website.com/wp-includes/js/dist/vendor/wp-polyfill.min.js?ver=7.4.4" id="wp-polyfill-js"></script>
    <script type='text/javascript' id='wp-polyfill-js-after'>
    ( 'fetch' in window ) || document.write( '<script src="https://website.com/wp-includes/js/dist/vendor/wp-polyfill-fetch.min.js?ver=3.0.0"></scr' + 'ipt>' );( document.contains ) || document.write( '<script src="https://website.com/wp-includes/js/dist/vendor/wp-polyfill-node-contains.min.js?ver=3.42.0"></scr' + 'ipt>' );( window.DOMRect ) || document.write( '<script src="https://website.com/wp-includes/js/dist/vendor/wp-polyfill-dom-rect.min.js?ver=3.42.0"></scr' + 'ipt>' );( window.URL && window.URL.prototype && window.URLSearchParams ) || document.write( '<script src="https://website.com/wp-includes/js/dist/vendor/wp-polyfill-url.min.js?ver=3.6.4"></scr' + 'ipt>' );( window.FormData && window.FormData.prototype.keys ) || document.write( '<script src="https://website.com/wp-includes/js/dist/vendor/wp-polyfill-formdata.min.js?ver=3.0.12"></scr' + 'ipt>' );( Element.prototype.matches && Element.prototype.closest ) || document.write( '<script src="https://website.com/wp-includes/js/dist/vendor/wp-polyfill-element-closest.min.js?ver=2.0.2"></scr' + 'ipt>' );
    </script>

    and this is what would appear at the bottom of the page:

    ' );( document.contains ) || document.write( '' );( window.DOMRect ) || document.write( '' );( window.URL && window.URL.prototype && window.URLSearchParams ) || document.write( '' );( window.FormData && window.FormData.prototype.keys ) || document.write( '' );( Element.prototype.matches && Element.prototype.closest ) || document.write( '' );

    Plugin Author Ronald Huereca

    (@ronalfy)

    @rpeacan

    Thank you. I see the same. I’ll have to figure out how that polyfill script comes into play.

    https://gist.github.com/ronalfy/ad626a860f5ca176635920869521fa9b

    Thank you,

    Ronald

    Plugin Author Ronald Huereca

    (@ronalfy)

    Would you be able to post a link to a screenshot where you are seeing the output on the front-end? I can’t seem to find the culprit.

    Worst case, I’ll post it in the Gutenberg forum as that appears to be running the Polyfill.

    Thanks.

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.