I just upgraded my server to Ubuntu 21.10, which came with PHP 8. This broke my primary Piwigo site since it was still running 11.5 so I went ahead and upgraded to 12.0.0RC2 (my beta/testing site was already on 12.0.0RC2).
That got the site working, but I'm seeing a LOT of PHP warnings on pages, which prevents some pages from loading properly (no image thumbnails, broken pages in the admin section, etc.). They're mostly "undefined array key" messages, like this:
<b>Warning</b>: Undefined array key "view" in <b>/mnt/media/Pictures/piwigo/wr_data/templates_c/lls45p^c9310276890b3017bb99a16408d5f7d91d83e11f_0.file.thumbnails.tpl.php</b> on line <b>78</b><br /> d-block">
Another example, from the main page:
<b>Warning</b>: Undefined array key "level" in <b>/mnt/media/Pictures/piwigo/wr_data/templates_c/lls45p^bb98cfaf8e797b60cbed66e1b7209fcaf7566f4f_0.file.menubar_tags.tpl.php</b> on line <b>34</b><br /> " href="index.php?/tags/3669-amy" title="display photos linked to this tag">amy</a> <a class="dropdown-item tagLevel<br />
And user manager:
<b>Warning</b>: Undefined array key "associate_selected" in <b>/mnt/media/Pictures/piwigo/wr_data/templates_c/p6jhns^c90e21c90b49112533d030a4da07114d285b1852_0.file.user_list.tpl.php</b> on line <b>438</b><br />
I've tried purging the cache and compiled templates, but can't seem to get rid of these. Any suggestions on where to look?
Piwigo 12.0.0RC2
Operating system: Linux
PHP: 8.0.8 (Show info) [2021-10-14 21:12:14]
MySQL: 8.0.26-0ubuntu1 [2021-10-14 21:12:14]
Graphics Library: ImageMagick 6.9.11-60
Last edited by windracer (2021-10-15 03:18:57)
Offline
I've really broken something ... thumbnails in albums aren't loading either:
Offline
I think I may try going back to PHP 7.4 ...
Offline
Rolling back to 7.4 wasn't a readily available option, but I was able to fix all of my issues by adding E_WARNING to show_php_errors in my local config:
$conf['show_php_errors'] = E_ALL ^ E_DEPRECATED ^ E_WARNING;
All of the warnings were breaking the HTML which was causing the problems like the images not loading. This fix seems a little heavy-handed, but at least my sites are functional again.
Offline
See also [Forum, post 180778 by erAck in topic 31258] Error Message for a generally better approach to log error messages instead of displaying them.
Offline