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

Uncaught TypeError with v14.b with option enabled: Add a map in main menu #247

Open
adr14nb opened this issue Feb 27, 2024 · 1 comment
Open

Comments

@adr14nb
Copy link

adr14nb commented Feb 27, 2024

If I enable the following option: Add a map in main menu
When running: piwigo-openstreetmap v14.b
With piwigo version 14.2.0
And PHP version either 8.1 or 8.2

I get the following error. Without the above option enabled, the error doesn't occur:

Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /home/adrinnet/public_html/zibat.com/_data/templates_c/1533b5u^1cc357dfa8011c1111254c3bd7d8cae100003895_0.file.menubar.tpl.php:58 Stack trace: #0 /home/adrinnet/public_html/zibat.com/include/smarty/libs/sysplugins/smarty_template_resource_base.php(123): content_65ddb96dd88200_49397808() #1 /home/adrinnet/public_html/zibat.com/include/smarty/libs/sysplugins/smarty_template_compiled.php(114): Smarty_Template_Resource_Base->getRenderedTemplateCode() #2 /home/adrinnet/public_html/zibat.com/include/smarty/libs/sysplugins/smarty_internal_template.php(217): Smarty_Template_Compiled->render() #3 /home/adrinnet/public_html/zibat.com/include/smarty/libs/sysplugins/smarty_internal_templatebase.php(238): Smarty_Internal_Template->render() #4 /home/adrinnet/public_html/zibat.com/include/smarty/libs/sysplugins/smarty_internal_templatebase.php(116): Smarty_Internal_TemplateBase->_execute() #5 /home/adrinnet/public_html/zibat.com/include/template.class.php(483): Smarty_Internal_TemplateBase->fetch() #6 /home/adrinnet/public_html/zibat.com/include/template.class.php(406): Template->parse() #7 /home/adrinnet/public_html/zibat.com/include/block.class.php(192): Template->assign_var_from_handle() #8 /home/adrinnet/public_html/zibat.com/include/menubar.inc.php(380): BlockManager->apply() #9 /home/adrinnet/public_html/zibat.com/include/menubar.inc.php(15): initialize_menu() #10 /home/adrinnet/public_html/zibat.com/index.php(103): include('/home/adrinnet/...') #11 {main} thrown in /home/adrinnet/public_html/zibat.com/_data/templates_c/1533b5u^1cc357dfa8011c1111254c3bd7d8cae100003895_0.file.menubar.tpl.php on line 58

I recently upgrade from PHP version 7.3 (I think!) and Piwigo version 13.8.0 (I think), which (I think!) prompted me to update piwigo-openstreetmap. Before the update the above option worked successfully. Sorry, I don't know which version opiwigo-openstreetmap I was using previously. I discovered by experimentation which of my setting was causing the problem. I think it's just this one setting as I can tweak all the other settings back and forth without hitting this.

Please let me know if you need more details.

Cheers
Adrian

@adr14nb
Copy link
Author

adr14nb commented Feb 27, 2024

My workaround for now is to disable "Add a map in main menu". With that turned off, I'm not seeing any issues.
Thought I should mention that in case anyone else hits this and it's not obvious.

btw Thanks for this fantastic extension. Being able to see where all my photos were taken makes Piwigo great.

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

1 participant