Title: [Plugin: Dave&#039;s WordPress Live Search] Wrong paths?!
Last modified: August 20, 2016

---

# [Plugin: Dave's WordPress Live Search] Wrong paths?!

 *  Resolved [techouse](https://wordpress.org/support/users/techouse/)
 * (@techouse)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/plugin-daves-wordpress-live-search-wrong-paths/)
 * I just installed your plugin and i got wrong paths to daves-wordpress-live-search.
   js, daves-wordpress-live-search.css and indicator.gif. Instead of a right path
   like
 * _hxxp://localhost/mywordpress/wp-content/plugins/daves-wordpress-live-search/
   js/daves-wordpress-live-search.js_
 * I got something weird like
 * _hxxp://localhost/mywordpress/wp-content/plugins/usr/share/wordpress/wp-content/
   themes/my-theme/js/daves-wordpress-live-search.js_
 * The latter is sort of a composition of my localhost WP url + an absolute system
   path to my wp-theme. Dunno why that is :/
 * I sort of fixed it by replacing:
 * `plugin_dir_url(__FILE__)`
 * with
 * `plugin_dir_url().'daves-wordpress-live-search/`
 * Here’s the DIFF:
 *     ```
       --- DavesWordPressLiveSearch.php
       +++ DavesWordPressLiveSearch.php
       @@ -29,7 +29,7 @@
                if (self::isSearchablePage()) {
                    wp_enqueue_script('jquery');
   
       -            wp_enqueue_script('daves-wordpress-live-search', plugin_dir_url(__FILE__).'js/daves-wordpress-live-search.js', 'jquery');
       +            wp_enqueue_script('daves-wordpress-live-search', plugin_dir_url().'daves-wordpress-live-search/js/daves-wordpress-live-search.js', 'jquery');
                    self::inlineSettings();
                }
   
       @@ -51,7 +51,7 @@
                        case 'default_red':
                        case 'default_blue':
                        case 'default_gray':
       -                    $style = plugin_dir_url(__FILE__).'css/daves-wordpress-live-search_'.$cssOption.'.css';
       +                    $style = plugin_dir_url().'daves-wordpress-live-search/css/daves-wordpress-live-search_'.$cssOption.'.css';
                            break;
                        case 'notheme':
                        default:
       @@ -82,7 +82,7 @@
                $minCharsToSearch = intval(get_option('daves-wordpress-live-search_minchars'));
                $xOffset = intval(get_option('daves-wordpress-live-search_xoffset'));
   
       -        $indicatorURL = plugin_dir_url(__FILE__).'indicator.gif';
       +        $indicatorURL = plugin_dir_url().'daves-wordpress-live-search/indicator.gif';
                $indicatorWidth = getimagesize(dirname(__FILE__) . "/indicator.gif");
                $indicatorWidth = $indicatorWidth[0];
       ```
   
 * [http://wordpress.org/extend/plugins/daves-wordpress-live-search/](http://wordpress.org/extend/plugins/daves-wordpress-live-search/)

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

 *  Thread Starter [techouse](https://wordpress.org/support/users/techouse/)
 * (@techouse)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/plugin-daves-wordpress-live-search-wrong-paths/#post-2356754)
 * Never mind, it was a local problem. Fixed it now 🙂
 *  [nledez](https://wordpress.org/support/users/nledez/)
 * (@nledez)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-daves-wordpress-live-search-wrong-paths/#post-2356859)
 * A idea to solve this error could be fine…
 * Thanks.
 *  [nledez](https://wordpress.org/support/users/nledez/)
 * (@nledez)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-daves-wordpress-live-search-wrong-paths/#post-2356860)
 * Exemple:
    After WordPress 3.4 migration I have error 404 on some plugins assets.
 * If you have this error, search on wp-content symlink.
 * I think it’s a regression from a old version.
 * Found idea here:
    [http://wordpress.stackexchange.com/questions/15202/plugins-in-symlinked-directories](http://wordpress.stackexchange.com/questions/15202/plugins-in-symlinked-directories)

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

The topic ‘[Plugin: Dave's WordPress Live Search] Wrong paths?!’ is closed to new
replies.

 * ![](https://s.w.org/plugins/geopattern-icon/daves-wordpress-live-search_daad6f.
   svg)
 * [Dave's WordPress Live Search](https://wordpress.org/plugins/daves-wordpress-live-search/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/daves-wordpress-live-search/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/daves-wordpress-live-search/)
 * [Active Topics](https://wordpress.org/support/plugin/daves-wordpress-live-search/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/daves-wordpress-live-search/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/daves-wordpress-live-search/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [nledez](https://wordpress.org/support/users/nledez/)
 * Last activity: [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-daves-wordpress-live-search-wrong-paths/#post-2356860)
 * Status: resolved