WordPress.org

Support

Support » Plugins and Hacks » Leaflet Maps Marker (Google Maps, OpenStreetMap, Bing Maps) » [Resolved] [Plugin: Leaflet Maps Marker] Plugin URL path shows wrong address

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

Viewing 15 replies - 1 through 15 (of 19 total)
  • Plugin Author RobertHarm

    @harmr

    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 RobertHarm

    @harmr

    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 RobertHarm

    @harmr

    I updated the trunk with the latest development version – can you please check, if this version works for you? If yes, I will release this version as v1.2

    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 RobertHarm

    @harmr

    Thats bad – I posted a question on WP-Stack-Exchange – 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 RobertHarm

    @harmr

    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)

    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.

    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 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 RobertHarm

    @harmr

    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 RobertHarm

    @harmr

    can you please send me a screenshot and the source code of the corresponding pages?

    Plugin Author RobertHarm

    @harmr

    well actually an admin access to the affected wordpress blogs would be best 😉

    Plugin Author RobertHarm

    @harmr

    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.

    Hey Robert, looks you fixed your bug, It is working now, on both server. Thanks man!

    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 RobertHarm

    @harmr

    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)
  • The topic ‘[Resolved] [Plugin: Leaflet Maps Marker] Plugin URL path shows wrong address’ is closed to new replies.
Skip to toolbar