Bug 461790 - Upload from Digikam 7.8.0 to piwigo 13.1.0 broken
Summary: Upload from Digikam 7.8.0 to piwigo 13.1.0 broken
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Plugin-WebService-Piwigo (show other bugs)
Version: 7.8.0
Platform: macOS (DMG) macOS
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-13 19:59 UTC by sj_kde
Modified: 2022-11-17 19:09 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 7.9.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description sj_kde 2022-11-13 19:59:56 UTC
The response provided by piwigo function ws_categories_getList in include/ws_function/pwg.categories.php is badly interpreted by Digikam's "Upload to Piwigo" webservice: "Invalid response received from remote Piwigo" (parseResponseListAlbums in core/dplugins/generic/webservices/piwigo/piwigotalker.cpp).

Piwigo responses looks like:
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok">
<categories>
<category id="215" ...>
</category>
</categories>
</rsp>

Digikam webservices logs are:
digikam.webservices: parseResponseLogin:  "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<rsp stat=\"ok\">\n1\n</rsp>"
digikam.webservices: parseResponseGetVersion:  "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<rsp stat=\"ok\">\n13.1.0\n</rsp>"
digikam.webservices: Version:  1301
digikam.webservices: foundResponse :  true
digikam.webservices: parseResponseListAlbums

cf https://github.com/Piwigo/Piwigo/issues/1786
Comment 1 Maik Qualmann 2022-11-13 21:53:30 UTC
Is it possible to provide access to a Piwigo gallery?

Maik
Comment 2 Maik Qualmann 2022-11-14 22:30:33 UTC
I created a VM with Piwigo. The Linux digiKam-7.8.0 AppImage works without problems with Piwigo 13.1.0. Your macOS digiKam version must work with Piwigo.

For digiKam-8.0.0 we need to make an adjustment to the QRegularExpression which fails for the version string.

Maik
Comment 3 sj_kde 2022-11-14 22:54:53 UTC
Thanks a lot for looking at it!

Indeed, I just checked with their online free version (https://piwigo.com/signup) and it also works. But it still doesn't work with my personal piwigo (13.1.0, gentoo package installation, no customisation at all). So I guess there might be an issue with something in one of my albums. Is there an easy way to compile only Digikam's "export to piwigo plugin" for macOS, without compiling all Digikam? And then add it and use it with the bundled Digikam?

Thanks again
Comment 4 Maik Qualmann 2022-11-15 07:25:28 UTC
Git commit 58e440376086a26470440c86bf6404221948ea08 by Maik Qualmann.
Committed on 15/11/2022 at 07:24.
Pushed by mqualmann into branch 'master'.

fix get Piwigo version in digiKam-8.0.0

M  +2    -1    core/dplugins/generic/webservices/piwigo/piwigotalker.cpp

https://invent.kde.org/graphics/digikam/commit/58e440376086a26470440c86bf6404221948ea08
Comment 5 Maik Qualmann 2022-11-15 07:33:10 UTC
Git commit bb98b07a1fbaaf2f86ef92899260935f10944a6f by Maik Qualmann.
Committed on 15/11/2022 at 07:32.
Pushed by mqualmann into branch 'qt5-maintenance'.

add debug for list Piwigo albums

M  +1    -1    core/dplugins/generic/webservices/piwigo/piwigotalker.cpp

https://invent.kde.org/graphics/digikam/commit/bb98b07a1fbaaf2f86ef92899260935f10944a6f
Comment 6 Maik Qualmann 2022-11-15 07:38:40 UTC
Using the debug output we will see what your Gentoo Piwigo server sends in response. With the next macOS test version of digiKam-7.9.0 that Gilles will make, you can test it from here:

https://files.kde.org/digikam/

Version must be > 11/13/2022.

Maik
Comment 7 sj_kde 2022-11-15 19:13:18 UTC
Thanks a lot! I'll test it again as soon as it is made.

Thanks again!
Comment 8 caulier.gilles 2022-11-16 04:58:23 UTC
New PKG installer for MacOS will be online this morning

Best

Gilles Caulier
Comment 9 sj_kde 2022-11-17 08:20:34 UTC
Thanks a lot!

The response starts with php warnings:
digikam.webservices: parseResponseListAlbums: "<br />\n<b>Deprecated</b>:  strip_tags(): Passing null to parameter #1 ($string) of type string is deprecated in <b>/home/www/photos/include/ws_functions/pwg.categories.php</b> on line <b>324</b><br />\n<br />\n<b>Deprecated</b>:  strip_tags(): Passing null to parameter #1 ($string) of type string is deprecated in <b>/home/www/photos/include/ws_functions/

That's why it fails. There was also a similar issue a bit further in the process.

I made a pull request in piwigo to get those warnings fixed: https://github.com/Piwigo/Piwigo/pull/1797

Thanks again very much for your help!
Comment 10 Maik Qualmann 2022-11-17 19:09:03 UTC
Thanks for the feedback, I'm closing here now.

Maik