Announcement

#1 2024-05-19 17:12:33

reox
Member
2023-03-06
18

[resolved] darktable export does not use album with piwigo 14.4

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:

Code:

[...]
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?

Code:

    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

 

#2 2024-05-22 00:21:04

Dero
Member
2023-08-03
8

Re: [resolved] darktable export does not use album with piwigo 14.4

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

 

#3 2024-05-27 09:30:12

reox
Member
2023-03-06
18

Re: [resolved] darktable export does not use album with piwigo 14.4

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

 

#4 2024-06-09 16:32:50

drmaemo
Member
2013-07-11
51

Re: [resolved] darktable export does not use album with piwigo 14.4

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)


Piwigo 14.3.0 on Linux
PHP: 8.1.26 and MySQL: 10.11.6-MariaDB
Graphics Library: ImageMagick 6.9.10-68

Offline

 

#5 2024-06-09 18:03:44

reox
Member
2023-03-06
18

Re: [resolved] darktable export does not use album with piwigo 14.4

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:

Code:

[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

 

#6 2024-06-09 21:02:10

reox
Member
2023-03-06
18

Re: [resolved] darktable export does not use album with piwigo 14.4

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

 

#7 2024-06-15 10:30:44

reox
Member
2023-03-06
18

Re: [resolved] darktable export does not use album with piwigo 14.4

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

 

#8 2024-06-15 12:57:56

erAck
Only trying to help
2015-09-06
2091

Re: [resolved] darktable export does not use album with piwigo 14.4

Nice find!


Running Piwigo at https://erack.net/gallery/

Offline

 

#9 2024-06-17 19:18:09

reox
Member
2023-03-06
18

Re: [resolved] darktable export does not use album with piwigo 14.4

The bug was btw already fixed in darktable!

Offline

 

#10 2024-06-18 13:07:11

drmaemo
Member
2013-07-11
51

Re: [resolved] darktable export does not use album with piwigo 14.4

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.


Piwigo 14.3.0 on Linux
PHP: 8.1.26 and MySQL: 10.11.6-MariaDB
Graphics Library: ImageMagick 6.9.10-68

Offline

 

#11 2024-06-18 13:20:10

reox
Member
2023-03-06
18

Re: [resolved] darktable export does not use album with piwigo 14.4

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

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact