Photo cannot be deleted, Piwigo 13.8.0 with PHP 7.4 #1754

Open
opened 2026-10-05 00:55:38 +02:00 by adam · 1 comment
Owner

Just tried to delete a photo and got this error message:

Warning: [mysql error 1054] Unknown column 'rank' in 'order clause'

SELECT i.id
FROM pwg_images AS i
LEFT JOIN pwg_image_tag AS it1 ON i.id = it1.image_id
WHERE
it1.tag_id = 22
GROUP BY i.id
ORDER BY rank ASC

; in /srv/$hostname/include/dblayer/functions_mysqli.inc.php on line 847

Fatal error: Uncaught Error: Call to a member function fetch_assoc() on bool in /srv/$hostname/include/dblayer/functions_mysqli.inc.php:908 Stack trace: #0 /srv/$hostname/plugins/SmartAlbums/include/functions.inc.php(546): query2array() #1 /srv/$hostname/plugins/SmartAlbums/include/functions.inc.php(51): smart_get_pictures() #2 [internal function]: smart_make_associations() #3 /srv/$hostname/plugins/SmartAlbums/include/functions.inc.php(115): array_map() #4 /srv/$hostname/include/functions_plugins.inc.php(264): smart_make_all_associations() #5 /srv/$hostname/admin/include/functions.php(2209): trigger_notify() #6 /srv/$hostname/plugins/AdminTools/include/events.inc.php(276): invalidate_user_cache() #7 /srv/$hostname/include/functions_plugins.inc.php(264): admintools_save_picture() #8 /srv/$hostname/picture.php(137): trigger_notify() #9 {main} thrown in /srv/$hostname/include/dblayer/functions_mysqli.inc.php on line 908

System: Devuan GNU/Linux 4 Chimaera
Webserver: nginx_1.18.0-6.1+deb11u3_all
PHP: php7.4-fpm_7.4.33-~deb11u4_amd64
Database: mariadb-server_1%3a10.5.21-0+deb11u1_all
Piwigo: 13.8.0

EDIT: The photo has been deleted in spite of that message, but still … should not happen this way

Just tried to delete a photo and got this error message: Warning: [mysql error 1054] Unknown column 'rank' in 'order clause' SELECT i.id FROM pwg_images AS i LEFT JOIN pwg_image_tag AS it1 ON i.id = it1.image_id WHERE it1.tag_id = 22 GROUP BY i.id ORDER BY rank ASC ; in /srv/$hostname/include/dblayer/functions_mysqli.inc.php on line 847 Fatal error: Uncaught Error: Call to a member function fetch_assoc() on bool in /srv/$hostname/include/dblayer/functions_mysqli.inc.php:908 Stack trace: #0 /srv/$hostname/plugins/SmartAlbums/include/functions.inc.php(546): query2array() #1 /srv/$hostname/plugins/SmartAlbums/include/functions.inc.php(51): smart_get_pictures() #2 [internal function]: smart_make_associations() #3 /srv/$hostname/plugins/SmartAlbums/include/functions.inc.php(115): array_map() #4 /srv/$hostname/include/functions_plugins.inc.php(264): smart_make_all_associations() #5 /srv/$hostname/admin/include/functions.php(2209): trigger_notify() #6 /srv/$hostname/plugins/AdminTools/include/events.inc.php(276): invalidate_user_cache() #7 /srv/$hostname/include/functions_plugins.inc.php(264): admintools_save_picture() #8 /srv/$hostname/picture.php(137): trigger_notify() #9 {main} thrown in /srv/$hostname/include/dblayer/functions_mysqli.inc.php on line 908 System: Devuan GNU/Linux 4 Chimaera Webserver: nginx_1.18.0-6.1+deb11u3_all PHP: php7.4-fpm_7.4.33-~deb11u4_amd64 Database: mariadb-server_1%3a10.5.21-0+deb11u1_all Piwigo: 13.8.0 EDIT: The photo has been deleted in spite of that message, but still … should not happen this way <!-- github-sync-id:1947544822 -->
Author
Owner

Hello, tried This problem was resolved by setting the order of images to automatic by default.

Kind regards

Hello, tried This problem was resolved by setting the order of images to automatic by default. Kind regards <!-- github-comment-id:1769928750 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/Piwigo#1754