Piwigo / piwigo-openstreetmap

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

Plugin crashes Piwigo 15 #263

Closed prolibre closed 1 month ago

prolibre commented 1 month ago

So the plugin seemed to work under Piwigo 15 ... until I clicked : "Search in this set" :-)

Here's the error in my logs:

[Tue Oct 22 17:02:34.653807 2024] [php:error] [pid 2021439:tid 2021439] [client IP] PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /PIWIGO_DIR/www/_data/templates_c/1q5rfb4^ae731811296351e7942bcf3458232e2c5fe63c2a_0.file.search_filters.inc.tpl.php:174\nStack trace:\n#0 /PIWIGO_DIR/www/include/smarty/libs/sysplugins/smarty_template_resource_base.php(123): content_6717be88c1e128_88277404()\n#1 /PIWIGO_DIR/www/include/smarty/libs/sysplugins/smarty_template_compiled.php(114): Smarty_Template_Resource_Base->getRenderedTemplateCode()\n#2 /PIWIGO_DIR/www/include/smarty/libs/sysplugins/smarty_internal_template.php(217): Smarty_Template_Compiled->render()\n#3 /PIWIGO_DIR/www/include/smarty/libs/sysplugins/smarty_internal_template.php(386): Smarty_Internal_Template->render()\n#4 /PIWIGO_DIR/www/_data/templates_c/1q5rfb4^25bfbe687f83704fb1cab4f283893b66874ab444_0.file.index.tpl.php(256): Smarty_Internal_Template->_subTemplateRender()\n#5 /PIWIGO_DIR/www/include/smarty/libs/sysplugins/smarty_template_resource_base.php(123): content_6717be88b7b2d9_05961129()\n#6 /PIWIGO_DIR/www/include/smarty/libs/sysplugins/smarty_template_compiled.php(114): Smarty_Template_Resource_Base->getRenderedTemplateCode()\n#7 /PIWIGO_DIR/www/include/smarty/libs/sysplugins/smarty_internal_template.php(217): Smarty_Template_Compiled->render()\n#8 /PIWIGO_DIR/www/include/smarty/libs/sysplugins/smarty_internal_templatebase.php(238): Smarty_Internal_Template->render()\n#9 /PIWIGO_DIR/www/include/smarty/libs/sysplugins/smarty_internal_templatebase.php(116): Smarty_Internal_TemplateBase->_execute()\n#10 /PIWIGO_DIR/www/include/template.class.php(486): Smarty_Internal_TemplateBase->fetch()\n#11 /PIWIGO_DIR/www/include/template.class.php(506): Template->parse()\n#12 /PIWIGO_DIR/www/index.php(370): Template->pparse()\n#13 {main}\n thrown in /PIWIGO_DIR/www/_data/templates_c/1q5rfb4^ae731811296351e7942bcf3458232e2c5fe63c2a_0.file.search_filters.inc.tpl.php on line 174, referer: https://URL

Have a nice day !

prolibre commented 1 month ago

Then I think it's a conflict in the names of the template variables (HEIGHT and WIDTH). So I tried changing the names of these variables in the plugin (OPENHEIGHT et OPENWIDTH and it seems to work. I did it “on the fly” :-) I'm attaching the plugin with my changes in the meantime.

piwigo-openstreetmap_14.d.zip

LintyDev commented 1 month ago

Hello, i will check that!

Thanks for your feedback 😄