Title: [Plugin: Dave&#039;s WordPress Live Search] getPluginPath() returns bad path -&gt; -&gt; js error
Last modified: August 19, 2016

---

# [Plugin: Dave's WordPress Live Search] getPluginPath() returns bad path -> -> js error

 *  [biziclop](https://wordpress.org/support/users/biziclop/)
 * (@biziclop)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/plugin-daves-wordpress-live-search-getpluginpath-returns-bad-path-js-error/)
 * Hi, I’m just testing your awesome-looking plugin with MAMP on my local machine,
   but daves-wordpress-live-search.js.php has syntax errors:
 *     ```
       LiveSearch.displayIndicator = function() {
       		jQuery("body").append('<img id="search_results_activity_indicator" src="/wordpress/wp-content/plugins/daves-wordpress-live-search/indicator.gif" />');
       ...
       		var indicatorX = (searchBoxPosition.left + LiveSearch.searchBoxes.outerWidth() - <br />
       <b>Warning</b>:  getimagesize(/wordpress/wp-content/plugins/daves-wordpress-live-search/indicator.gif) [<a href='function.getimagesize'>function.getimagesize</a>]: failed to open stream: No such file or directory in <b>/Works/Site/wordpress/wp-content/plugins/daves-wordpress-live-search/daves-wordpress-live-search.js.php</b> on line <b>299</b><br />
        - 2) + 'px';
       ```
   
 * WordPress site is installed at
    `http://testsite/ <=> /Works/Site/` Actual wp
   directory is at `http://testsite/wordpress/ <=> /Works/Site/wordpress/`
 * getimagesize gets
    `/wordpress/wp-content/plugins/daves-wordpress-live-search/
   indicator.gif` but it should get `/Works/Site/wordpress/wp-content/plugins/daves-
   wordpress-live-search/indicator.gif`
 * Bonus: in daves-wordpress-live-search.js.php
    `var indicatorX = (searchBoxPosition.
   left + LiveSearch.searchBoxes.outerWidth() - <?php $dimensions = getimagesize("
   $pluginPath/indicator.gif"); print $dimensions[0]; ?> - 2) + 'px';` should be
   fixed by `... getimagesize($pluginPath.'indicator.gif') ...` because $pluginPath
   seems to have a trailing slash.
 * [http://wordpress.org/extend/plugins/daves-wordpress-live-search/](http://wordpress.org/extend/plugins/daves-wordpress-live-search/)

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

 *  Plugin Author [Dana Ross](https://wordpress.org/support/users/csixty4/)
 * (@csixty4)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/plugin-daves-wordpress-live-search-getpluginpath-returns-bad-path-js-error/#post-1655727)
 * You have no idea how awesome & refreshing it is to get feedback like this. Thanks!
 *  Plugin Author [Dana Ross](https://wordpress.org/support/users/csixty4/)
 * (@csixty4)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/plugin-daves-wordpress-live-search-getpluginpath-returns-bad-path-js-error/#post-1655728)
 * Looks like I already fixed the imagesize issue…sweet:
 * “compatibility with servers that don’t allow getimagesize to refer to files by
   URL” (looks like it should fix this issue as well)
 * `var indicatorX = (searchBoxPosition.left + LiveSearch.searchBoxes.outerWidth()-
   <?php $dimensions = getimagesize(dirname(__FILE__)."/indicator.gif"); print $
   dimensions[0]; ?> - 2) + 'px';`

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

The topic ‘[Plugin: Dave's WordPress Live Search] getPluginPath() returns bad path-
> -> js error’ 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/)

 * 2 replies
 * 2 participants
 * Last reply from: [Dana Ross](https://wordpress.org/support/users/csixty4/)
 * Last activity: [15 years, 9 months ago](https://wordpress.org/support/topic/plugin-daves-wordpress-live-search-getpluginpath-returns-bad-path-js-error/#post-1655728)
 * Status: not resolved