• Resolved tvandiepen

    (@tvandiepen)


    Hi,

    On the front end I do not see the badge displayed. Some troubleshooting of the badge issue reveals that I do get the image’s alt text (“malware removal and website security”) displaying. Also, when I click on the displayed alt text, the pop up that opens does not populate with any verification details. The browser’s Inspect Element function reveals the following html code is generated by the plugin:

    <div id=”sitelock_shield_logo_placeholder”>
    <div id=”sitelock_shield_logo” class=”fixed_btm” style=”bottom:15px;position:fixed;_position:absolute;width:117px;height:67px;right:15px;”>
    <a hrefhttps://www.sitelock.com/varify.php?site= “ onclick=”window.open(‘https”//www.sitelock.com/verify.php?site’,width=600,height=600,left=160,top=170’);return false;”>
    <img alt=”malware removal and website security” title=”SiteLock” src=”//shield.sitelock.com/shield/”>
    </a>
    </div>
    </div>

    Note that there is no reference to the site domain to be verified. The code for function generating this does not ascertain the domain name it is running on to pass back to sitelock to verify:

    function sitelock_add_this_script_footer() {
        $location      = get_option( 'sitelock_badge_location' );
        $badge_link    = esc_url( get_option( 'sitelock_badge_link' ) );
        $badge_img_src = get_option( 'sitelock_badge_img' );
        ...
    }

    I added four lines of code to ascertain the domain name and append it to the two variables that are used later in the function to pass to sitelock for verification:

    function sitelock_add_this_script_footer() {
    /* added following two lines to set up for site domain - Ted van Diepen 2016-11-1 */
        $urlparts = parse_url(site_url());
        $domain = $urlparts [host];</strong>
    
        $location      = get_option( 'sitelock_badge_location' );
        $badge_link    = esc_url( get_option( 'sitelock_badge_link' ) );
        $badge_img_src = get_option( 'sitelock_badge_img' );
    /* added following two lines to get site domain into link and src urls - Ted van Diepen 2016-11-1 */
        $badge_link    = $badge_link . $domain;
        $badge_img_src = $badge_img_src . $domain;</strong>
    
        ...
    }

    With these modifications made to the function sitelock_add_this_script_footer() found in wp-content/plugins/sitelock/admin/functions-sitelock-admin.php I was able to get the correct badge image displayed and the popup to be fully populated with the SiteLock verified information concerning my site.

    For the last three updates to the plugin, I have had to add the same four lines of code to re-establish the intended results. Please look into this issue. I would prefer your solution rather than my workaround.

    Thank you,
    Ted

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Adam W. Warner

    (@awarner20)

    Hi @tvandiepen,

    I’ve forwarded this to our team and they are looking into it for a fix.

    Note: As you probably know, any changes you make to plugin files will get overwritten when an update is applied.

    We’ll update this thread when we have further information on a fix. Thanks for reporting this with your code details and experience.

    Plugin Contributor Adam W. Warner

    (@awarner20)

    Hi again @tvandiepen,

    We’ve resolved that issue and pushed an update. Should be seeing version 4.0.4 now.

    After updating to v4.0.4 you’ll need to go to badge settings and press “Save”.

    Please let us know how it goes and if you run into any other issues.

    Thread Starter tvandiepen

    (@tvandiepen)

    Hi @awarner20,

    Version 4.0.4 solution has corrected the issue for me without any modifications done by me.

    Thanks,

    Ted

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Badge does not display and popup does not populate’ is closed to new replies.