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

Works on global & photo level, but error on album level? #61

Closed meulie closed 9 years ago

meulie commented 9 years ago

Hi,

On global level the plugin produces a working map: http://pub.meulie.net/osmmap/categories&v=1 On album-level, however, it doesn't: http://pub.meulie.net/osmmap/category/Honig-1&v=1 I get 'Permalink for album not found' On photo-level it works ok: http://pub.meulie.net/picture/2-02/category/Honig-1

How do I get the plugin to work ok on album-level?

xbgmsharp commented 9 years ago

Hi, Do you have any custom settings on your PWG install? Maybe via the LocalFiles Editor plugin? I am not able to reproduce the issue. OSM plugin should work on any sub album-level. As there has been some commit, could you update to the latest version available on GitHub.

meulie commented 9 years ago

I've updated to the github version just yesterday :)

I am running NGINX, but I thought that rewrite ^/osmmap((/|$).*)$ /osmmap.php$1 last; would be all I need to make things works...

xbgmsharp commented 9 years ago

Did that fix the issue? does it works for you now? If so I will update the wiki with your solution.

meulie commented 9 years ago

No, that doesn't fix it. That's my current setup, the one that makes global/photo-level work, but album-level break.

xbgmsharp commented 9 years ago

Do you have any custom settings on your PWG install via LocalFiles Editor plugin? I am surprise you album is call Honig-1. It should be 1.

meulie commented 9 years ago

I have the following custom settings: $conf['question_mark_in_urls'] = false; $conf['php_extension_in_urls'] = false; $conf['category_url_style'] = 'id-name'; $conf['picture_url_style'] = 'id-file'; $conf['top_number'] = 10; $conf['level_separator'] = ' → '; $conf['show_exif'] = false; $conf['session_name'] = 'pub_id'; $conf['remember_me_name'] = 'pub_remember'; $conf['show_gt'] = true; $conf['compiled_template_cache_language'] = true; $conf['tag_url_style'] = 'tag'; $conf['show_newsletter_subscription'] = false; $conf['max_requests']=5;

The Honig-1 (instead of 1) is probably the result of a permalink I set on that album?

meulie commented 9 years ago

Made a change to the site-config, and now it works :)

My rewrite-section is now as follows:

        location @rewrite {
                rewrite ^/osmmap((/|$).*)$ /osmmap.php?$1 last;
                rewrite ^/picture((/|$).*)$ /picture.php$1 last;
                rewrite ^/index((/|$).*)$ /index.php$1 last;
                rewrite ^/i((/|$).*)$ /i.php$1 last;
        }