• Resolved Armshouse Group

    (@armshous)


    Hi there,

    Just upgraded WordPress to 4.5 and to the latest WordFence version too. Installation went OK, but I have the following code at the top of the WP login page:

    (function(url){ if(/(?:Chrome\/26\.0\.1410\.63 Safari\/537\.31|WordfenceTestMonBot)/.test(navigator.userAgent)){ return; } var addEvent = function(evt, handler) { if (window.addEventListener) { document.addEventListener(evt, handler, false); } else if (window.attachEvent) { document.attachEvent('on' + evt, handler); } }; var removeEvent = function(evt, handler) { if (window.removeEventListener) { document.removeEventListener(evt, handler, false); } else if (window.detachEvent) { document.detachEvent('on' + evt, handler); } }; var evts = 'contextmenu dblclick drag dragend dragenter dragleave dragover dragstart drop keydown keypress keyup mousedown mousemove mouseout mouseover mouseup mousewheel scroll'.split(' '); var logHuman = function() { var wfscr = document.createElement('script'); wfscr.type = 'text/javascript'; wfscr.async = true; wfscr.src = url + '&r=' + Math.random(); (document.getElementsByTagName('head')[0]||document.getElementsByTagName('body')[0]).appendChild(wfscr); for (var i = 0; i < evts.length; i++) { removeEvent(evts[i], logHuman); } }; for (var i = 0; i < evts.length; i++) { addEvent(evts[i], logHuman); } })('//www.armshousegroup.co.uk/?wordfence_logHuman=1&hid=053AC61F2D67B6517856FA554D11B72F');

    Any ideas?

    https://www.ads-software.com/plugins/wordfence/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author WFMattR

    (@wfmattr)

    Hi,

    Do you have any customizations to your login page? I haven’t seen this happen before — this code is normally included (without being visible) on regular pages for the Live Traffic feature — I can’t see why it may be appearing visibly on the login page, but it may be due to another plugin or other manual customizations.

    There seems to be some bad HTML (misplaced quotes and brackets) after the style tag for: /themes/salient%20child/login/login-styles.css

    You can temporarily turn off the “Live Traffic” option near the top of the Wordfence options page, to remove the code, but another plugin or the child theme may need to be updated or fixed to prevent other issues or resolve it permanently.

    -Matt R

    Thread Starter Armshouse Group

    (@armshous)

    Hello Matt,

    That seems to be it. I updated the site-specific plugin which styles the login and all is good.

    Thanks for your help.
    AG

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Code on login page’ is closed to new replies.