Skip to content

Problem displaying photos when Sharing is unknown in Config.

Upgraded zoph on my Debian build/test system from 0.9.19 to 1.0, where I am working on the package. The zoph on this system is only used for testing, and Sharing had never been enabled in its configuration. Most photo viewing pages, apart from thumbnails in bulk edits were blank. The apache logs show

[Mon Feb 06 14:38:19.447479 2023] [php:error] [pid 11781] [client 192.168.122.1:42270] PHP Fatal error: Uncaught TypeError: photo\\view\\view::getShare(): Return value must be of type template\\block, null returned in /usr/share/zoph/www/php/classes/photo/view/view.inc.php:167\nStack trace:\n#0 /usr/share/zoph/www/php/classes/photo/view/display.inc.php(173): photo\\view\\view->getShare()\n#1 /usr/share/zoph/www/php/classes/web/view/view.inc.php(74): photo\\view\\display->view()\n#2 /usr/share/zoph/www/php/photo.php(33): web\\view\\view->display()\n#3 {main}\n thrown in /usr/share/zoph/www/php/classes/photo/view/view.inc.php on line 167

Setting Sharing in Configuration fixed the issue, which remained fixed even if Sharing was then disabled again.

Note that the system is running Debian sid with PHP8.2, but I do not think it is an 8.1 vs 8.2 issue.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information