Pages: 1
Hi!
I use darktable 4.7 to export photos to Piwigo 14.4. However, since 14.4 (or earlier) it seems the Album is not set for the uploaded picture.
I saw this bug https://piwigo.org/forum/viewtopic.php?id=33609 as well and applied the patch, but that does not help...
There are no errors in the php log. I also recorded the upload process and for the JSON request which uploads the image, I can see the following:
[...] user-agent: darktable/4.7.0~git1245.1a6d1ab1-1+11708.1 accept: */* content-type: multipart/form-data; boundary=------------------------943f9634ebb3f655 cookie: pwg_id=sdf --------------------------943f9634ebb3f655 Content-Disposition: form-data; name="method" pwg.images.addSimple --------------------------943f9634ebb3f655 Content-Disposition: form-data; name="image" /tmp/IMG_7536.jpg --------------------------943f9634ebb3f655 Content-Disposition: form-data; name="category" 5 --------------------------943f9634ebb3f655 Content-Disposition: form-data; name="level" 0 --------------------------943f9634ebb3f655 Content-Disposition: form-data; name="image"; filename="IMG_7536.jpg" Content-Type: image/jpeg [....] --------------------------943f9634ebb3f655-- HTTP/1.1 200 OK Server: nginx Date: Sun, 19 May 2024 15:00:13 GMT Content-Type: text/plain; charset=utf-8 Connection: close Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate Pragma: no-cache {"stat":"ok","result":{"image_id":372,"url":"https:\/\/serverurl\/picture\/372\/category\/5"}}
Cateory ID 5 is indeed the correct album I want to have the image in, but it never appears there.
As the API call looks fine for me and also piwigo answers with the correct category, I wonder why the photo does not show up in the album?
Is this a known issue in piwigo 14.x? Is there anything I have to change on the server for 14.x? Is there anything else I could debug to find out where this error is coming from?
Piwigo 14.4.0 Installed on 24 April 2022, 2 years 3 weeks 4 days ago Operating system: Linux PHP: 8.2.18 (Show info) [2024-05-19 15:11:56] MySQL: 10.11.6-MariaDB-0+deb12u1 [2024-05-19 15:11:56] Graphics Library: ImageMagick 6.9.11-60
Offline
Hi
I'm using DT nightly (4.7.xxx) (OSX) and no issues exporting to Piwigo 4.4.0. No problems creating a new album or inserting in an existing album.
D
Offline
okay, so maybe it is my setup that has some problems?
I noticed for example, that the dialog to link a photo to an album has some problems when there are parentheses in the album name. I had an album called "(Wild)life", which was always displayed as "life(Wild)" in the Dialog.
However, I do not see any PHP errors or anything in the piwigo log. So I'm not even sure where to start...
As the API requests by darktable looks fine, the problem seems to be inside of Piwigo.
Offline
I have what I think is a similar issue where uploading from DT (4.6.x) to my Piwigo (4.3) site results in an orphaned file even though I had selected an album that my Piwigo user account has permissions. I reported my issue in this forum. Not sure if the issue is DT or Piwigo, and not sure if the root cause of this issue is a priority for developers.
Note: I will upgrade to 4.4 soon.
Last edited by drmaemo (2024-06-09 16:33:41)
Offline
Also weird: I do not even get a message "orphaned files" now. But if I click on the photo in the admin panel, it says orphan.
I think the problem is on the piwigo side - as in the response from the API the correct album is set.
anyone has an idea how to debug that? Enabling debug logs did not show anything useful though :/
edit: I played around with it some more. I found out that if I wait long enough, the photo will eventually show up in the album! This explains why the admin panel does not show the warning that orphaned photos are found - possibly because the photo is already in the album (or at least half of it...).
Does this makes sense? What could be the problem?
editedit: I see the following in the log:
[2024-06-09 16:37:15] [DEBUG] empty_lounge, exec=4mBN, begins [2024-06-09 16:37:15] [DEBUG] empty_lounge, exec=4mBN wins the race and gets the token! [2024-06-09 16:37:15] [DEBUG] empty_lounge, exec=4mBN, ends
After these three lines appear, the photo appears in the album.
These lines appear about 5 to 6 minutes after the upload.
Is that the culprit?
Last edited by reox (2024-06-09 18:38:48)
Offline
I found this issue in the darktable issue tracker: [Github] darktable issue #10928
Maybe darktable is the problem after all and a regression of this bug? Would have to monitor the traffic again to check if that is triggered...
Offline
I found the problem. `cateory_id` was made mandatory 5 months ago and thus the uploadComplete command fails.
I opened a bug report here: [Github] darktable issue #16994
Offline
Nice find!
Offline
The bug was btw already fixed in darktable!
Offline
reox wrote:
The bug was btw already fixed in darktable!
Thank you for doing this work and reporting it here at the Piwigo Forum. I think this fix will appear in the next release of Dark Table (v4.8). Until then, I will try your work around and wait 5 to 6 minutes and see if the photo will eventually appear in the intended photo album.
Offline
It wasn't me who fixed it in DT ;)
There is probably a way to send upload complete with the category ID also manually (I guess that is trivial, just get a token and send it via curl...), or maybe run the empyt_lounge somehow...
Offline
Pages: 1