Pages: 1
So I don't have much experience at all with php or MySQL beyond some extremely basic "must-know" stuff that I've needed to figure out in order to have any website at all. I'm a very visual person.
I installed Piwigo 14.2 recently (via Softaculous), I HAVE added some images to my gallery already and created a bunch of albums. Once I knew I liked Piwigo, that was when I decided to check out plugins & themes. As I installed each one I checked to make sure the site worked at all (i.e. users could see the site), I didn't check anything in the admin panel.
Today I tried to add more photos to the gallery, but when I clicked on the "Add" link in the left nav, I got this error:
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_65da3bac8ee904_86464232(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
Not being a developer, I wasn't entirely sure how to parse this, but it does appear to be a problem rooted in the theme. If so, maybe it's worth mentioning that I attempted to install Bootstrap Darkroom, so that may have been the trigger for this issue.
I uninstalled all the plugins & themes I had installed, but that didn't correct the problem (and unfortunately I can't recall the names of the two plugins I'd installed, but I can look for those if it would help).
I also tried accessing the Add Photos option by creating an album and clicking the button from there; although I successfully created the album in the album manager, I did indeed get the error when trying to go to Add Photos.
I don't know how to reinstall Piwigo via Softaculous without uninstalling first, and I don't want to redo the gallery work I've done so far. If there's one particular file that's been messed up & needs to be edited or replaced, I can do that via FTP if given clear instructions.
Everything else in the admin panel seems to work.
Last edited by deliriumzer0 (2024-02-24 21:33:42)
Offline
You could inspect the _data/templates_c/p6jhns^801c7f6a3d11ed9da655a0082c57d2c956597e9c_0.file.photos_add_direct.tpl.php file, in the leading comment there's the generating .php file mentioned with that you could determine which plugin or theme (or core code) would be the culprit.
Offline
Weird, it says it's from the default template in line 3? That's definitely odd, because I was able to add photos with absolutely no problem before.
Offline
Can anyone else offer any help on this? If not I'm probably just going to delete the installation & fresh reinstall.
Offline
I'm actually answering [Forum, post 189679 by deliriumzer0 in topic 33589] Unable to Add Photos UPDATE - figured out what really triggered this here to keep things together.
You'd have to find which code in p6jhns^801c7f6a3d11ed9da655a0082c57d2c956597e9c_0.file.photos_add_direct.tpl.php line 488 corresponds to what source code in the admin's template from which that file is generated. It may need a check whether the object variable is of type countable before being evaluated. As those *.tpl.php files are generated with different file names on each system we simply don't know what the content in your file is. You could post line 488 and the three lines before and after here in a code block. And the exact file name that is stated on top of p6jhns^801c7f6a3d11ed9da655a0082c57d2c956597e9c_0.file.photos_add_direct.tpl.php from which it was generated.
Offline
Lines 485 through 491 are as follows:
</ul> </div> <?php } else { if (count($_smarty_tpl->tpl_vars['setup_warnings']->value) > 0) {?> <div class="warnings"> <ul> <?php
and line 3 reads
from '/home/deliguqw/public_html/ayugallery/admin/themes/default/template/photos_add_direct.tpl' */
Offline
Pages: 1