plegall / Piwigo-community

11 stars 23 forks source link

User Creating Sub Albums Issue #85

Open sjgarth opened 3 months ago

sjgarth commented 3 months ago

Hi, Piwigo 14.3 PHP 8.1 Community Plugin 14a All themes User permissions granted to upload and create sub-albums.

After clicking create sub-album, entering a name and clicking create, it sends user back to upload page where no albums are visible. The upload page then needs a refresh to see the new sub-album and then upload photos. If I do not create the new sub-album, everything works as required. To illustrate this, a video is available;

https://github.com/plegall/Piwigo-community/assets/74574374/e93bcb1c-e921-4042-906b-3dabd43ac8f1

beccare commented 3 weeks ago

I hacked this for myself by just reloading the page with javascript.

replacing in plugins/community/add_photos.tpl around line 138

/* we hide the ability to create another album, this is different from the admin upload form */
/* in Community, it's complicated to refresh the list of parent albums */
jQuery("#linkToCreate").hide();

with just window.location.reload();

This way the drop down is repopulated (but reset to the first entry)

Ainz commented 2 weeks ago

Is this not related to the inability for Community users to create sub albums and post images in a sub album?

image

And if so could it be due to my Community album being in /root instead of in a /Community/ album?

image