Title: Problem with plugin URL
Last modified: August 21, 2016

---

# Problem with plugin URL

 *  [tomkerswill](https://wordpress.org/support/users/tomkerswill/)
 * (@tomkerswill)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/problem-with-plugin-url/)
 * Hi
 * I’m seeing an issue where the plugin URL is not generated correctly. The URLs
   for the CAPTCHA images an other elements, contain the full path (eg. internal
   server path).
 * I think there is a bug in the file si-contact-form.php
 * in the function get_captcha_url_cf()
 * ….
 * Here, there are quite a few comments in the code about WP_PLUGIN_URL not working.
   Instead, there’s some workaround code, but it isn’t working for me. Instead, 
   I think you need the following WP function, which should return the correct path
   even for multisite:
 * $captcha_url_cf = plugins_url(‘si-contact-form/captcha’);
 * Let me know if you need more info on my setup etc.
 * Thanks
 * Tom
 * [http://wordpress.org/plugins/si-contact-form/](http://wordpress.org/plugins/si-contact-form/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter [tomkerswill](https://wordpress.org/support/users/tomkerswill/)
 * (@tomkerswill)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/problem-with-plugin-url/#post-4133182)
 * Sorry – quick update to this. I think this is happening because I have a symlinked
   web directory, and so the __FILE__ construce, which is passed into the plugins_url
   function, contains the absolute link to the file, rather than the relative URL–
   eg. this WordPress bug:
 * [http://core.trac.wordpress.org/ticket/16953](http://core.trac.wordpress.org/ticket/16953)
 *  [Mike Challis](https://wordpress.org/support/users/mikechallis/)
 * (@mikechallis)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/problem-with-plugin-url/#post-4133285)
 * That ticket had been open for 2 years and is still open unresolved?
 * Did you try changing that line in the code?
    Did it work?
 * Mike
 *  Thread Starter [tomkerswill](https://wordpress.org/support/users/tomkerswill/)
 * (@tomkerswill)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/problem-with-plugin-url/#post-4133346)
 * Thanks for the quick response! Yes, it works well for me. I think the problem
   is that in the script, the __FILE__ construct is used — which is the recommended
   way to do it from WordPress. But that doesn’t work if there are any kinds of 
   symlinks involved. The way I’ve done it seems to work, but I guess on the other
   hand, I’ve hardcoded the ‘si-contact-form/captcha’ part of the path —- I’m not
   sure that’s likely to change, though, because the path within the plugin should
   always stay the same, so I’d have thought it would be okay.
 * Tom

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Problem with plugin URL’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/si-contact-form_dde2be.svg)
 * [Fast Secure Contact Form](https://wordpress.org/plugins/si-contact-form/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/si-contact-form/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/si-contact-form/)
 * [Active Topics](https://wordpress.org/support/plugin/si-contact-form/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/si-contact-form/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/si-contact-form/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [tomkerswill](https://wordpress.org/support/users/tomkerswill/)
 * Last activity: [12 years, 9 months ago](https://wordpress.org/support/topic/problem-with-plugin-url/#post-4133346)
 * Status: not resolved