Title: [Plugin: Leaflet Maps Marker] Plugin URL path shows wrong address
Last modified: August 20, 2016

---

# [Plugin: Leaflet Maps Marker] Plugin URL path shows wrong address

 *  Resolved [jbaterdene](https://wordpress.org/support/users/jbaterdene/)
 * (@jbaterdene)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-leaflet-maps-marker-plugin-url-path-shows-wrong-address/)
 * This is the example of the one of icon link. Looks entire plugin links are not
   correct. Only one thing is working now, it is admin panel configuration. Also
   it is making markers, but not showing in browsers.
 * **On Windows Web Host**
    [http://XXXXX/wordpress/wp-content/plugins/D:/Hosting/5465771/html/wordpress/wp-content/plugins/leaflet-maps-marker/img/logo-mapsmarker.png](http://XXXXX/wordpress/wp-content/plugins/D:/Hosting/5465771/html/wordpress/wp-content/plugins/leaflet-maps-marker/img/logo-mapsmarker.png)
 * **On Linux Web Host**
    [http://XXXXX/wordpress/wp-content/plugins/D:/inetpub/vhosts/XXXXX/httpdocs/wordpress/wp-content/plugins/leaflet-maps-marker/img/logo-mapsmarker.png](http://XXXXX/wordpress/wp-content/plugins/D:/inetpub/vhosts/XXXXX/httpdocs/wordpress/wp-content/plugins/leaflet-maps-marker/img/logo-mapsmarker.png)
 * If loading the fixed address by manually the icon shows correct.
 * [http://XXXXX/wordpress/wp-content/plugins/leaflet-maps-marker/img/logo-mapsmarker.png](http://XXXXX/wordpress/wp-content/plugins/leaflet-maps-marker/img/logo-mapsmarker.png)
 * [http://XXXXX/wordpress/wp-content/plugins/leaflet-maps-marker/img/logo-mapsmarker.png](http://XXXXX/wordpress/wp-content/plugins/leaflet-maps-marker/img/logo-mapsmarker.png)
 * How I can fix this url error? Thanks.
 * [http://wordpress.org/extend/plugins/leaflet-maps-marker/](http://wordpress.org/extend/plugins/leaflet-maps-marker/)

Viewing 15 replies - 1 through 15 (of 19 total)

1 [2](https://wordpress.org/support/topic/plugin-leaflet-maps-marker-plugin-url-path-shows-wrong-address/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/plugin-leaflet-maps-marker-plugin-url-path-shows-wrong-address/page/2/?output_format=md)

 *  Plugin Author [Robert Seyfriedsberger](https://wordpress.org/support/users/harmr/)
 * (@harmr)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-leaflet-maps-marker-plugin-url-path-shows-wrong-address/#post-2497372)
 * Thats strange. I initially saved the wp-path-info in a file and included this
   one in the API files to get the right directory where wp-config.php is located:
 *     ```
       file_put_contents(dirname(__FILE__).'/leaflet-wp-path.php', '<?php define(\'WP_PATH\',\''.ABSPATH.'\'); ?>');'
   
       and in the API files
   
       <code>include_once(dirname($_SERVER['SCRIPT_FILENAME']).'/leaflet-wp-path.php');</code>
   
       Due to compatibility reasons (some hosts don´t allow this kind of file operations) I skipped this solution during development and constructed the path to wp-config.php from the dirname of the file:
       ```
   
 * $wp_plugin_path_modified = explode(‘/’,dirname(__FILE__),-3);
    $wp_path = implode(‘/’,
   $wp_plugin_path_modified); include_once($wp_path.’/wp-config.php’); ` I will 
   implement a fallback for v1.2 to include the path from file and if this not exists(
   which might be on several host which dont permit file based operations) – the
   above solution is taken instead. I hope that this will increase compatibility
   with host configuration like yours, although I am aware, that this might also
   not work for host configurations, which don´t allow the function file_put_contents().
 * If anyone has an idea for a better solution, I would very much appreciate it 
   🙂
 *  Plugin Author [Robert Seyfriedsberger](https://wordpress.org/support/users/harmr/)
 * (@harmr)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-leaflet-maps-marker-plugin-url-path-shows-wrong-address/#post-2497565)
 * With v1.2 of the plugin the method for constructing the path to wp-config.php
   for API links will change. I hope that this will fix your problem – please let
   me know if this works for you (v1.2 will be released soon)
 *  Plugin Author [Robert Seyfriedsberger](https://wordpress.org/support/users/harmr/)
 * (@harmr)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-leaflet-maps-marker-plugin-url-path-shows-wrong-address/#post-2497567)
 * I updated the trunk with the [latest development version](http://downloads.wordpress.org/plugin/leaflet-maps-marker.zip)–
   can you please check, if this version works for you? If yes, I will release this
   version as v1.2
 *  Thread Starter [jbaterdene](https://wordpress.org/support/users/jbaterdene/)
 * (@jbaterdene)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-leaflet-maps-marker-plugin-url-path-shows-wrong-address/#post-2497573)
 * Hi Robert, Thanks for your fast respond.
    I tested on a both server.
 * Sorry for the bad news, same error shows.
 * I’ll wait and test, no problem, take a time feel free.
    Thanks for helping me.
 *  Plugin Author [Robert Seyfriedsberger](https://wordpress.org/support/users/harmr/)
 * (@harmr)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-leaflet-maps-marker-plugin-url-path-shows-wrong-address/#post-2497575)
 * Thats bad – I posted a question on [WP-Stack-Exchange](http://wordpress.stackexchange.com/questions/38560/what-is-the-best-way-to-get-directory-path-for-wp-config-php)–
   hopefully I get some hints from there, how to best solve this issue.
 * It could also help, if I could have ftp-access to the plugin directory to do 
   some tests on my own
 *  Plugin Author [Robert Seyfriedsberger](https://wordpress.org/support/users/harmr/)
 * (@harmr)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-leaflet-maps-marker-plugin-url-path-shows-wrong-address/#post-2497597)
 * Just released v1.2 with a new method for construction the path to wp-load. Please
   try if this version works on your host – it should be more compatible than the
   one we tried with the beta version.
 * If it doesnt work, please post again details about the error (please with debug
   enabled)
 *  Thread Starter [jbaterdene](https://wordpress.org/support/users/jbaterdene/)
 * (@jbaterdene)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-leaflet-maps-marker-plugin-url-path-shows-wrong-address/#post-2497620)
 * Sorry Robert, I was installed again, but nothing changes, also I have huge errors
   on host with debug enabled mode. So probably my WordPress configuration is in
   a bad condition. I never enabled this Debug mode before. So, Now, I’m start checking
   all my configurations. Sorry for bordering you my not confirmed requests. Let
   you know when I finish the checks. Sorry. Thanks for helping me.
 *  [PedroArtur](https://wordpress.org/support/users/pedroartur/)
 * (@pedroartur)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-leaflet-maps-marker-plugin-url-path-shows-wrong-address/#post-2497628)
 * Hi Robert. It seem that I have the same problem, and no icons nor map is appearing.
   The link of this images appear to be something like “[http://localhost/…/wp-content/plugins/C:/wamp/…/wp-content/plugins/leaflet-maps-marker/img/icon-add.png](http://localhost/…/wp-content/plugins/C:/wamp/…/wp-content/plugins/leaflet-maps-marker/img/icon-add.png)
   for one of the icons.
 * I do not know if I am being enough specific, but I am, by no means, an expert
   in programming :/
 *  Plugin Author [Robert Seyfriedsberger](https://wordpress.org/support/users/harmr/)
 * (@harmr)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-leaflet-maps-marker-plugin-url-path-shows-wrong-address/#post-2497629)
 * damn – thought I fixed that bug :-/
    will look again into this issue – any tipps
   are appreciated as I really don´t know what else to check…
 *  Plugin Author [Robert Seyfriedsberger](https://wordpress.org/support/users/harmr/)
 * (@harmr)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-leaflet-maps-marker-plugin-url-path-shows-wrong-address/#post-2497630)
 * can you please send me a screenshot and the source code of the corresponding 
   pages?
 *  Plugin Author [Robert Seyfriedsberger](https://wordpress.org/support/users/harmr/)
 * (@harmr)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-leaflet-maps-marker-plugin-url-path-shows-wrong-address/#post-2497631)
 * well actually an admin access to the affected wordpress blogs would be best 😉
 *  Plugin Author [Robert Seyfriedsberger](https://wordpress.org/support/users/harmr/)
 * (@harmr)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-leaflet-maps-marker-plugin-url-path-shows-wrong-address/#post-2497632)
 * please test again with v1.2.1 which I just released. Your input Pedro was very
   helpful in finding code fragments which could have caused the error. I change
   the methods for construct paths again and used recommended WordPress functions
   instead of constants.
 * Please let me know, if v1.2.1 works with you now.
 *  Thread Starter [jbaterdene](https://wordpress.org/support/users/jbaterdene/)
 * (@jbaterdene)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-leaflet-maps-marker-plugin-url-path-shows-wrong-address/#post-2497634)
 * Hey Robert, looks you fixed your bug, It is working now, on both server. Thanks
   man!
 *  Thread Starter [jbaterdene](https://wordpress.org/support/users/jbaterdene/)
 * (@jbaterdene)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-leaflet-maps-marker-plugin-url-path-shows-wrong-address/#post-2497635)
 * Another thing, about similar plugin Leaflet. Just a interesting things happening.
   The plugin was with same error, not shows icons when your plugin was a enabled.
   Now this plugin dead.
 * These errors from Leaflet plugin not yours.
    Fatal error: Cannot redeclare activate()(
   previously declared in D:\inetpub\vhosts\XXXXX\httpdocs\wordpress\wp-content\
   plugins\geolocation\geolocation.php:40) in D:\inetpub\vhosts\XXXXX\httpdocs\wordpress\
   wp-content\plugins\leaflet\leaflet.php on line 307
 * Guess configuration was a same.
    You just killed this plugin, sorry for a bad
   news.
 * I think you need to send your configuration information to Hind.
    I was installed
   and tested just because of your plugin and his plugin was used same named Leaflet
   configuration.
 *  Plugin Author [Robert Seyfriedsberger](https://wordpress.org/support/users/harmr/)
 * (@harmr)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-leaflet-maps-marker-plugin-url-path-shows-wrong-address/#post-2497637)
 * that’s great to hear – finally 🙂
 * Ad redeclare error – thanks for the report – will fix this within the next release!

Viewing 15 replies - 1 through 15 (of 19 total)

1 [2](https://wordpress.org/support/topic/plugin-leaflet-maps-marker-plugin-url-path-shows-wrong-address/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/plugin-leaflet-maps-marker-plugin-url-path-shows-wrong-address/page/2/?output_format=md)

The topic ‘[Plugin: Leaflet Maps Marker] Plugin URL path shows wrong address’ is
closed to new replies.

 * ![](https://ps.w.org/leaflet-maps-marker/assets/icon.svg?rev=970936)
 * [Leaflet Maps Marker (Google Maps, OpenStreetMap, Bing Maps)](https://wordpress.org/plugins/leaflet-maps-marker/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/leaflet-maps-marker/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/leaflet-maps-marker/)
 * [Active Topics](https://wordpress.org/support/plugin/leaflet-maps-marker/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/leaflet-maps-marker/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/leaflet-maps-marker/reviews/)

 * 19 replies
 * 3 participants
 * Last reply from: [Robert Seyfriedsberger](https://wordpress.org/support/users/harmr/)
 * Last activity: [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-leaflet-maps-marker-plugin-url-path-shows-wrong-address/page/2/#post-2497650)
 * Status: resolved