Support » Plugin: Ad Blocking Advisor » Not working

  • Resolved coolph

    (@coolph)


    Not working. It only shows on the source code but never kicks off. Could you please take a look.

    • This topic was modified 1 year, 11 months ago by  coolph.

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Pat O’Brien

    (@obrienlabs)

    How did you install the plugin? The script looks weird in your view source. Specifically all the HTML after the .js.

    <script type='text/javascript' src='wp-content/plugins/ad-blocking-advisor/js/ad-blocking-advisor.js'%20defer%20onload='' defer onload=''></script>

    Accessing that URL directly shows 404 – so this is part of the problem.

    Are you using caching?
    Can you remove the plugin and re-install it?

    I installed the plugin normally through WordPress dashboard. I reinstalled it again but no luck.

    And you’re right. The issue is that it is somehow sanitizing the URL by converting ‘ to & #039; and space to %20.

    ../js/ad-blocking-advisor.js'%20defer%20onload=''

    From the source code of plugin I can see you’re using esc_url() function. Would that be causing the issue?

    wp_register_script( "aba_script", esc_url( plugin_dir_url( __FILE__ ) . 'js/ad-blocking-advisor.js' ), array( 'jquery' ) );

    I think you need to remove last ‘ inside esc_url(). Something like
    'js/ad-blocking-advisor.js )',

    This one was coming fine –

    echo '<img src="' . plugin_dir_url( __FILE__ ) . 'images/1px-transparent.png" alt="">';

    <div class="footer_ad"><img src="http://www.techiedelight.com/wp-content/plugins/ad-blocking-advisor/images/1px-transparent.png" alt="" style="display: none !important;"></div>

    • This reply was modified 1 year, 11 months ago by  coolph.
    • This reply was modified 1 year, 11 months ago by  coolph.
    • This reply was modified 1 year, 11 months ago by  coolph.
    Plugin Author Pat O’Brien

    (@obrienlabs)

    Hmm, maybe you’re right. This is the first I’m seeing this. Can you give it a try in your install (remove the last ')?

    If that fixes it for you, I’ll do some testing here too and issue an update.

    • This reply was modified 1 year, 11 months ago by  Pat O'Brien.

    Nope. Removing last ' didn’t work. Crashed my site. But on removing esc_url() function, the JavaScript is loaded fine.

    wp_register_script( "aba_script", plugin_dir_url( __FILE__ ) . 'js/ad-blocking-advisor.js', array( 'jquery' ) );

    Plugin Author Pat O’Brien

    (@obrienlabs)

    Thanks for testing it out. I didn’t have a chance to get to it today. Let me test it on a couple of my test sites and I’ll issue an update

    Plugin Author Pat O’Brien

    (@obrienlabs)

    Just to send an update; I’ve updated the plugin to version 2.0 which fixes this issue and a couple of others.

    Plugin Author Pat O’Brien

    (@obrienlabs)

    Marking resolved. Thanks again for the help

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Not working’ is closed to new replies.