petitssuisses / piwigo-ShareAlbum

Share Album is a Piwigo plugin to enable private categories sharing via a public URL
17 stars 11 forks source link

Uncaught Error: #74

Closed Nudin closed 3 years ago

Nudin commented 3 years ago

When going on "Shared Albums" in the plugins settings I get the following error:

Warning:  [mysql error 1054] Unknown column 's.created_by' in 'field list'
SELECT s.id, s.cat as 'category', c.name as `album`, c.uppercats as `uppercats`, s.user_id, u.username as `user`, s.code as 'code', s.creation_date as `creation_date`, count(l.id) as `visits`, max(l.visit_d) as `last_visit`, s.created_by, uc.username as `shared_by`
    FROM piwigo_sharealbum s
    LEFT JOIN piwigo_sharealbum_log l
        ON s.cat = l.cat_id 
    LEFT JOIN piwigo_categories c
        ON c.id = s.cat
    LEFT JOIN piwigo_users u
        ON u.id = s.user_id
    LEFT JOIN piwigo_users uc
        ON s.created_by = uc.id
    GROUP BY s.id
    ORDER BY s.creation_date DESC in /var/www/piwigo/include/dblayer/functions_mysqli.inc.php on line 864

Fatal error: Uncaught Error: Call to a member function fetch_assoc() on bool in /var/www/piwigo/include/dblayer/functions_mysqli.inc.php:930 Stack trace: #0 /var/www/piwigo/plugins/ShareAlbum/admin/albums.php(117): query2array('SELECT s.id, s....') #1 /var/www/piwigo/plugins/ShareAlbum/admin.php(30): include('/var/www/piwigo...') #2 /var/www/piwigo/admin/plugin.php(53): include_once('/var/www/piwigo...') #3 /var/www/piwigo/admin.php(298): include('/var/www/piwigo...') #4 {main} thrown in /var/www/piwigo/include/dblayer/functions_mysqli.inc.php on line 930
petitssuisses commented 3 years ago

Argh, the update function did not work correctly. Quick fix if you can :

petitssuisses commented 3 years ago

Fixed in 11.5 release, please update from the admin panel

erAck commented 3 years ago

Fwiw, I had the same even after upgrade to 11.5 (with https://github.com/petitssuisses/piwigo-ShareAlbum/pull/75 already applied (adding just the ']')) and switched from deactivated to activated plugin. Deinstalled, installed in en_UK then again leads to the breakage fixed by that PR so apply that patch again and after that it then works.