petitssuisses / piwigo-ShareAlbum

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

Not working on V11 #67

Closed tibey1 closed 3 years ago

tibey1 commented 3 years ago

Hello,

Thanks for great plugin that allow me to share single album like I used to do on flickr.

Little pb, with ShareAlbum 11.1 on piwigo 11.3 I keep getting redirected to a page saying "You are not authorised to access the requested page" when I open sharealbum links.

tibey1 commented 3 years ago

I tried with plugin version 11.2 and same issue

petitssuisses commented 3 years ago

Hi, Could you check in any of the shared album you have created, if the album itself (in Albums > Manage > ....> Edit > Permissions if a Permission is granted for a "share_xxxxxxxx" user ? Example below : 2021-02-12 17_48_27-Piwigo 11 3 0 __ Piwigo Administration — Mozilla Firefox

tibey1 commented 3 years ago

yes permissions are fine, and user is listed in the user section.

tibey1 commented 3 years ago

I uninstalled the plugin and reinstalled, and shared a new album. now I have an error when I go to the shared link

https://tibey.tk/piwi/?xauth=sywmEkmzrGuv

Warning: array_merge(): Expected parameter 1 to be an array, null given in /home/clients/1774a12c6c487feef3e8b0ca8cf4dfff/tibey/piwi/include/functions_user.inc.php on line 382

Warning: Invalid argument supplied for foreach() in /home/clients/1774a12c6c487feef3e8b0ca8cf4dfff/tibey/piwi/include/functions_user.inc.php on line 384

Warning: [mysql error 1064] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

SELECT cat_id FROM pp4t_user_access WHERE user_id = ; in /home/clients/1774a12c6c487feef3e8b0ca8cf4dfff/tibey/piwi/include/dblayer/functions_mysqli.inc.php on line 864

Fatal error: Uncaught Error: Call to a member function fetch_assoc() on bool in /home/clients/1774a12c6c487feef3e8b0ca8cf4dfff/tibey/piwi/include/dblayer/functions_mysqli.inc.php:925 Stack trace: #0 /home/clients/1774a12c6c487feef3e8b0ca8cf4dfff/tibey/piwi/include/functions_user.inc.php(585): query2array('\nSELECT cat_id\n...', NULL, 'cat_id') #1 /home/clients/1774a12c6c487feef3e8b0ca8cf4dfff/tibey/piwi/include/functions_user.inc.php(410): calculate_permissions(NULL, NULL) #2 /home/clients/1774a12c6c487feef3e8b0ca8cf4dfff/tibey/piwi/include/functions_user.inc.php(293): getuserdata(8, true) #3 /home/clients/1774a12c6c487feef3e8b0ca8cf4dfff/tibey/piwi/include/user.inc.php(60): build_user(8, true) #4 /home/clients/1774a12c6c487feef3e8b0ca8cf4dfff/tibey/piwi/include/common.inc.php(154): include('/home/clients/1...') #5 /home/clients/1774a12c6c487feef3e8b0ca8cf4dfff/tibey/piwi/index.php(11): include_once('/home/clients/1...') #6 {main} thrown in /home/clients/1774a12c6c487feef3e8b0ca8cf4dfff/tibey/piwi/include/dblayer/functions_mysqli.inc.php on line 925

petitssuisses commented 3 years ago

Hi I just connected and it works

petitssuisses commented 3 years ago

Looks like a session issue. What if you open the link in a private browser mode ?

tibey1 commented 3 years ago

Yes it was in private mode. Really weird, now it works also on my side, but it only show images set visible to 'everyone'. Is this the expected behaviour ?

petitssuisses commented 3 years ago

Yes, if you have different levels of permissions in one album, it sets the visibility to the lowest available level. (nice pics by the way !)

tibey1 commented 3 years ago

Ok thanks ! I guess deleting the extension data and reinstallating did the trick.