Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to edit places piwigo 13.1 #222

Open
grantiago opened this issue Nov 1, 2022 · 2 comments
Open

unable to edit places piwigo 13.1 #222

grantiago opened this issue Nov 1, 2022 · 2 comments

Comments

@grantiago
Copy link

grantiago commented Nov 1, 2022

Hi. On the admin page settings -> places tab none of the buttons work. submit, edit, delete.
Warning: Attempt to read property "value" on null in
/www/piwi/_data/templates_c/p6jhns^6caaed17a20c8c4c21840c5d21766c16755e6f6a_0.file.admin_place.tpl.php on line 242

from the apache log:
PHP Warning: Undefined array key "PWG_TOKEN" in
/www/piwi/_data/templates_c/p6jhns^6caaed17a20c8c4c21840c5d21766c16755e6f6a_0.file.admin_place.tpl.php on line 242

Editing the photos I can save the lat lng. but have no option to pull down a saved place.

Environment
Piwigo 13.1.0
Installed on 7 May 2022, 5 months 3 weeks 3 days ago
Operating system: Linux
PHP: 8.0.25
MySQL: 8.0.31-0ubuntu0.20.04.1 [2022-11-01 11:31:45]
Graphics Library: External ImageMagick 6.9.10-23
Cache size 5.58 Mo   calculated 24 minutes ago Refresh
Activated plugin list2
LocalFiles Editor
VideoJS
OpenStreetMap

Thank you.

@gueba
Copy link

gueba commented Dec 10, 2022

I found two possible solutions for this that work for me without noticeable problems:
I prefer the second.

  1. Edit plugins/piwigo-openstreetmap/admin/admin_place.tpl lline148:
    change
    <input type="hidden" name="pwg_token" value="{$PWG_TOKEN}">
    to:
    <input type="hidden" name="pwg_token" value="">
  2. Edit plugins/piwigo-openstreetmap/admin/admin_place.php from line 155:
    $template->assign( array( 'OSM_PATH' => OSM_PATH, 'all_places' => $all_places, ) );
    add:
    $template->assign( array( 'OSM_PATH' => OSM_PATH, 'all_places' => $all_places, 'PWG_TOKEN' => get_pwg_token(), ) );

@grantiago
Copy link
Author

grantiago commented Dec 24, 2022

@gueba Nice work. thank you. The first worked for me. the second didn't. though I left it in place.

  • Piwigo13.4.0
  • Installed on 23 December 2022, 6 hours ago
  • Operating system: Linux
  • PHP: 8.1.13
  • MySQL: 8.0.31-0
  • ubuntu0.20.04.2 [2022-12-23 18:51:18]
  • Graphics Library: ImageMagick 6.9.10-23

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants