WordPress.org

Ready to get started?Download WordPress

Forums

Leaflet Maps Marker (Google Maps, OpenStreetMap, Bing Maps)
[resolved] [Plugin: Leaflet Maps Marker] Plugin URL path shows wrong address (20 posts)

  1. jbaterdene
    Member
    Posted 2 years ago #

    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

    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

    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

    How I can fix this url error? Thanks.

    http://wordpress.org/extend/plugins/leaflet-maps-marker/

  2. RobertHarm
    Member
    Plugin Author

    Posted 2 years ago #

    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 :-)

  3. RobertHarm
    Member
    Plugin Author

    Posted 2 years ago #

    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)

  4. RobertHarm
    Member
    Plugin Author

    Posted 2 years ago #

    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

  5. jbaterdene
    Member
    Posted 2 years ago #

    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.

  6. RobertHarm
    Member
    Plugin Author

    Posted 2 years ago #

    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

  7. RobertHarm
    Member
    Plugin Author

    Posted 2 years ago #

    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)

  8. jbaterdene
    Member
    Posted 2 years ago #

    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.

  9. PedroArtur
    Member
    Posted 2 years ago #

    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 :/

  10. RobertHarm
    Member
    Plugin Author

    Posted 2 years ago #

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

  11. RobertHarm
    Member
    Plugin Author

    Posted 2 years ago #

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

  12. RobertHarm
    Member
    Plugin Author

    Posted 2 years ago #

    well actually an admin access to the affected wordpress blogs would be best ;-)

  13. RobertHarm
    Member
    Plugin Author

    Posted 2 years ago #

    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.

  14. jbaterdene
    Member
    Posted 2 years ago #

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

  15. jbaterdene
    Member
    Posted 2 years ago #

    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.

  16. RobertHarm
    Member
    Plugin Author

    Posted 2 years ago #

    that's great to hear - finally :-)

    Ad redeclare error - thanks for the report - will fix this within the next release!

  17. PedroArtur
    Member
    Posted 2 years ago #

    Dear Robert

    I'm glad the problem is now solved! :) Btw, yesterday I was with a friend of mine who tried to install your plugin and it was working perfectly. Then I installed in another root and in that case it was ok. So we couldnt understand what the problem was, but gladly you did it!

    My last cent: 5 starts!!

  18. PedroArtur
    Member
    Posted 2 years ago #

    Hi Robert. As far as I can see, everything is working fine, when I build my map with markers, the only problem now is that the markers are not correctly linked to their source in the preview or in the map itself (all but the default one). For instance, one url would be something like '/wp-contentuploadsleaflet-maps-marker-icons/bar_coktail.png' (as you see without slashes).

    I could easily solve it by creating a new folder with the icons, but I feel I sohould tell you ;)

  19. RobertHarm
    Member
    Plugin Author

    Posted 2 years ago #

    Hi Pedro,
    can you please check if this version works for you:
    http://www.mapsmarker.com/wp-content/uploads/leaflet-maps-marker-122beta.zip
    thanks
    Robert

    @jbaterdene: I checked your reported error - this has nothing to do with my plugin. The old leaflet plugin and the plugin geolocation use the same function name - this caused the error and can only be fixed by those two plugin authors.

  20. RobertHarm
    Member
    Plugin Author

    Posted 2 years ago #

    Hi Pedro again,
    forget the beta version - I think I found the problem and released v1.2.2 - please check if with this version the custom icons now show up (if not, please try uninstalling and then reinstalling the plugin).
    Thanx
    Robert

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic