Piwigo / piwigo-bootstrap-darkroom

A mobile-ready and feature-rich theme for Piwigo photo gallery, based on Bootstrap 4
Apache License 2.0
83 stars 40 forks source link

If template used with community plugin v12.b it does not assign the correct album to uploaded images #299

Closed colinardo closed 2 years ago

colinardo commented 2 years ago

Hello, there is an issue when using this theme in conjunction with the current community plugin v12.b when uploading images to an album. The uploaded images are not assigned to the right category thus do not appear in the album after uploading. I investigated the problem and found a missing POST event in the file add_photos.tpl in the template directory of the theme which assigns the category to uploaded images.

I added the pwg.images.uploadCompleted event which is used in the original community plugin template to add_photos.tpl and after that the images are correctly assigned to the correct album

jQuery.ajax({ url: rootUrl + "ws.php?format=json&method=pwg.images.uploadCompleted", type:"POST", data: { pwg_token: pwg_token, image_id: uploadedPhotos.join(","), category_id: uploadCategory.id, } });

Regards @colinardo

colinardo commented 2 years ago

👍