Piwigo / piwigo-openstreetmap

OpenStreetMap integration for Piwigo
http://piwigo.org/ext/extension_view.php?eid=701
GNU General Public License v3.0
35 stars 35 forks source link

OSWORLDMAP links to a non-existent page #76

Closed patmans closed 8 years ago

patmans commented 8 years ago

Hi -

Using the current git views for both piwigo-openstreetmap and piwigo, the OSWORLDMAP (in the left menu) has a link to a non-existent page. Otherwise, the maps are showing up on the home page and also for images with GPS coordinates, plus I can configure this map plugin, so it seems to otherwise be working as expected.

Am I missing something with the installation?

I installed via both the piwigo Plugins Manage "other plugins available", and got the same result as I did using "git clone git://github.com/xbgmsharp/piwigo-openstreetmap.git" while in my piwigo plugins directory.

That is, for a piwigo page (sorry I don't want to link to my page, as I'm still setting things up, and don't want to post a public link to it):

http://somedomain.tld/gallery

OSWORLDMAP links to:

http://somedomain.tld/gallery/osmmap.php?/categories&v=2

But osmmap.php doesn't exist there, though there's one at http://somedomain.tld/gallery/plugins/piwigo-openstreetmap/osmmap.php, and then using that link doesn't show me a world map as I'd expect.

Thanks ...

patmans commented 8 years ago

So, it looks like I'm supposed to manually generate the osmmap.php after installation, I did that, and it's working fine.

If manually adding this file is required to get it to work, the wiki (and maybe the README.md) should be updated.

xbgmsharp commented 8 years ago

The file is create on the installation on the plugin. https://github.com/xbgmsharp/piwigo-openstreetmap/blob/master/maintain.inc.php#L123

You need to allow the permission of your web-server user (www-data) to create osmmap.php file or you do it manually. It is specify in the wiki on the first paragraph, maybe it is not clear enough. https://github.com/xbgmsharp/piwigo-openstreetmap/wiki#piwigo-openstreetmap

Piwigo plugins directory need to be writable to install the plugin.

Piwigo root directory need to writable to create 'osmmap.php' file.
patmans commented 8 years ago

OK, thanks for clearing that up!

I have been trying to limit the permissions as much as possible, I had made the plugins directory writable, but not the piwigo "root" directory.

I uninstalled piwigo-openstreetmap, made the piwigo root writable, re-installed piwigo-openstreetmap and now it works as expected without manually copying the osmmap.php file (note that this also fixed a problem I had with GPX files not showing up properly - now I just have to figure out how to arrange all those GPX files).

It would be nice if it would fail or at least display a warning during the install if it fails in any way.

xbgmsharp commented 8 years ago

I do the same, you only need the write permission while you activate the plugin. You can remove the permission after. The plugin directory does not need to be writable if you download and uncompress the plugin manually. Agree I try to generate a warning or error when the file creation failed. It was not possible with the old PWG plugin system. Then we have work on a new one, but I did not migrate my code yet. http://piwigo.org/doc/doku.php?id=dev:changes_in_2.7#plugin_maintenance_class

Regarding the GPX files, please a new issue and we can have a look at it.

patmans commented 8 years ago

The GPX file was not displaying anything, it was actually a read-permission problem with the file itself, and not with the install.