• Resolved Ate Up With Motor

    (@ate-up-with-motor)


    Hi,

    I just tried installing this plugin, but found it doesn’t work. I ran an external test and discovered the problem.

    The plugin appears to have the following script path hard-coded into it:

    [domain]/wp-content/plugins/wp-donottrack/donottrack-min.js?dntver=0.8.4

    The problem is that the website’s content folder is no longer called wp-content; I changed it for security reasons.

    Is there a way to update the plugin to allow for that? I could try to hack the code, but I’m leery of doing that because it will just disappear the next time you update.

    Thanks!

    https://www.ads-software.com/plugins/wp-donottrack/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Frank Goossens

    (@futtta)

    If you’re up to it; feel free to change and provide me with a patch-set. If it works I’ll push it out in a next version ??

    Thread Starter Ate Up With Motor

    (@ate-up-with-motor)

    Unfortunately, I don’t really know how to do that, at least not in a way that would be useful to you. (I could find the references in the code to wp-content and change that to the actual folder name, but I don’t have the technical skills to come up with a patch that would automatically insert the correct directory.) I’m not a programmer…

    Plugin Author Frank Goossens

    (@futtta)

    OK, I’ll put in my “to do”-list, but it might take some time.

    Plugin Author Frank Goossens

    (@futtta)

    had a quick look and I’m afraid there’s no wp-content hardcoded. this is the essence of the code that creates the URL for the JS-file;

    $dnt_file="donottrack-min.js";
    $dnt_plugin_url = trailingslashit(get_bloginfo('wpurl')) . PLUGINDIR . '/' . dirname(plugin_basename(__FILE__)).'/';
    $wp_donottrack_js=$dnt_plugin_url.$dnt_file."?dntver=".$dnt_version;

    This implies that on the condition the constant PLUGINDIR is set correctly to e.g. my-content-folder, wp-donottrack will indeed be loaded from the correct URL (without /wp-content/).

    But apperantly PLUGINDIR is deprecated (or returning wrong info), so I just pushed out 0.8.6 (hot on the heals of 0.8.5) switching to wordpress’ plugins_url() function instead.

    hope this helps,
    frank

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Broken link’ is closed to new replies.