I just installed Piwigo and I get multiple errors in Apache logs:
[Fri Sep 09 11:48:26.789391 2022] [proxy_fcgi:error] [pid 326601:tid 139646931572480] [client 88.17.132.159:0] AH01071: Got error 'PHP message: PHP Warning: Undefined array key "COMMENT_COUNT" in /home/vistaalmar/public_html/galeria/_data/templates_c/jxxawy^796448735c4a3936c84b937b2d2f83a0d60f6d81_0.file.picture_info_cards.tpl.php on line 287PHP message: PHP Warning: Attempt to read property "value" on null in /home/vistaalmar/public_html/galeria/_data/templates_c/jxxawy^796448735c4a3936c84b937b2d2f83a0d60f6d81_0.file.picture_info_cards.tpl.php on line 287', referer: https://www.vistaalmar.es/galeria/pictu … _peniscola
In the Piwigo configuration I have show errors disabled: $conf['show_php_errors'] = 0;
But I want them to disappear from the Apache logs as well, is there a way to coordinate this? Thank you very much,
Offline
I don't think disabling all logging of errors is a good idea as you won't know what's going wrong, but if you wish: add
@ini_set('log_errors', false);
to Piwigo's local config.
Offline
Tanks erAck
I don't want to hide the errors in the registry, I want someone to help me figure out why the error occurs.
My setup:
PHP 8.0.23
MySQLi 10.3.32-MariaDB
Piwigo version: 12.3.0
I don't have Piwigo comments enabled.
The error is produced by this line:
{if isset($metadata) || (isset($comment_add) || $COMMENT_COUNT > 0)}
in file: /themes/bootstrap_darkroom/template/picture_info_cards.tpl
I have fixed the error by deleting || $COMMENT_COUNT of that line
Offline
But now another error occurs:
[Fri Sep 09 18:37:59.421274 2022] [proxy_fcgi:error] [pid 305585:tid 139646847645440] [client 88.17.132.159:0] AH01071: Got error 'PHP message: PHP Warning: Undefined array key "IS_IN_CADDIE" in / home/vistaalmar/public_html/galeria/_data/templates_c/jxxawy^4f6f9992201b5aec7dd30ed41d4a667a9ea03ac1_0.file.public_controller.tpl.php on line 174', referer: https://www.vistaalmar.es/galeria/
Which is produced by this line:
{if isset($ato.U_CADDIE) and isset($ato.IS_PICTURE)}
AdminTools.initCaddie({$current.id});
{/if}
In the file: /plugins/AdminTools/template/public_controller.tpl
If possible some developer should look at the code to find out what is going wrong.
Offline
I have also fixed the above error: Undefined array key "IS_IN_CADDIE"
Erasing the lines:
58: {if isset($ato.U_CADDIE) and isset($ato.IS_PICTURE)}
AdminTools.initCaddie({$current.id});
{/if}
Y
105: {if isset($ato.U_CADDIE)}
<li {if $ato.IS_IN_CADDIE}class="disabled"{/if}><a class="icon-flag add-caddie ato-min-2" href="{$ato.U_CADDIE}">{'Add to caddy'|translate}</a></li>
{/if}
in the file: /plugins/AdminTools/template/public_controller.tpl
Offline