Announcement

#1 2024-04-07 02:54:27

deliriumzer0
Member
2024-02-24
5

Unable to Add Photos UPDATE - figured out what really triggered this

Awhile back I posted this thread: https://piwigo.org/forum/viewtopic.php?id=33488

Well, there has been a development! I was wrong about the cause in my title, hence the new thread.

After a reinstall (now running 14.3.0) and several uploads and not touching any extensions, themes, etc. I stumbled upon the real trigger for the error after paying much closer attention to what I was doing.

On the Add Photos admin page I was getting the "In your php ini file upload_max_filesize is bigger than post_max_size" alert message. When I go to my cpanel and the php.ini file in my piwigo site's directory, those amounts are equal, so I'm not sure what to do about that.

So for the time being, since none of my images were any bigger than the post_max_size measurement anyway, I decided to click the "x" to hide the alert message so it wasn't distracting me.

And as soon as I hid the php.ini alert message, the page refreshed into the error.

Code:

Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /home/deliguqw/public_html/ayugallery/_data/templates_c/p6jhns^801c7f6a3d11ed9da655a0082c57d2c956597e9c_0.file.photos_add_direct.tpl.php:488 Stack trace: #0 /home/deliguqw/public_html/ayugallery/include/smarty/libs/sysplugins/smarty_template_resource_base.php(123): content_65ff1c164ade53_68304522(Object(Smarty_Internal_Template)) #1 /home/deliguqw/public_html/ayugallery/include/smarty/libs/sysplugins/smarty_template_compiled.php(114): Smarty_Template_Resource_Base->getRenderedTemplateCode(Object(Smarty_Internal_Template)) #2 /home/deliguqw/public_html/ayugallery/include/smarty/libs/sysplugins/smarty_internal_template.php(217): Smarty_Template_Compiled->render(Object(Smarty_Internal_Template)) #3 /home/deliguqw/public_html/ayugallery/include/smarty/libs/sysplugins/smarty_internal_templatebase.php(238): Smarty_Internal_Template->render(false, 0) #4 /home/deliguqw/public_html/ayugallery/include/smarty/libs/sysplugins/smarty_internal_templatebase.php(116): Smarty_Internal_TemplateBase->_execute(Object(Smarty_Internal_Template), NULL, NULL, NULL, 0) #5 /home/deliguqw/public_html/ayugallery/include/template.class.php(483): Smarty_Internal_TemplateBase->fetch('photos_add_dire...') #6 /home/deliguqw/public_html/ayugallery/include/template.class.php(406): Template->parse('photos_add', true) #7 /home/deliguqw/public_html/ayugallery/admin/photos_add_direct.php(158): Template->assign_var_from_handle('ADMIN_CONTENT', 'photos_add') #8 /home/deliguqw/public_html/ayugallery/admin/photos_add.php(73): include('/home/deliguqw/...') #9 /home/deliguqw/public_html/ayugallery/admin.php(346): include('/home/deliguqw/...') #10 {main} thrown in /home/deliguqw/public_html/ayugallery/_data/templates_c/p6jhns^801c7f6a3d11ed9da655a0082c57d2c956597e9c_0.file.photos_add_direct.tpl.php on line 488

This explains why the error's source was the default template - it's literally in the Admin panel's template, no extension or other theme was the source of it.

So how do I fix this? Can I go into the code somewhere and turn that alert message back on somehow? I'd rather see it than not be able to add photos from the web interface at all.

In case it matters, I'm using PHP 8.1.

Offline

 

#2 2024-04-07 13:09:52

erAck
Only trying to help
2015-09-06
2038

Re: Unable to Add Photos UPDATE - figured out what really triggered this


Running Piwigo at https://erack.net/gallery/

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact