plegall/Piwigo-community

User Creating Sub Albums Issue

Opened this issue · 2 comments

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;

community.upload.issue.mp4

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

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