Bug 146703 - Color Palette extensions list is empty
Summary: Color Palette extensions list is empty
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
7.3.0.1 rc
Hardware: All All
: medium normal
Assignee: Gabor Kelemen (allotropia)
URL:
Whiteboard: target:7.4.0 target:7.3.0.2 target:7.3.1
Keywords: implementationError
Depends on:
Blocks:
 
Reported: 2022-01-11 19:54 UTC by Gabor Kelemen (allotropia)
Modified: 2022-01-26 15:22 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
The Extensions: Color Palette dialog in current master (99.96 KB, image/png)
2022-01-11 19:54 UTC, Gabor Kelemen (allotropia)
Details
The Color Palette extensions dialog after the proposed patch in qtz locale (117.15 KB, image/png)
2022-01-11 22:43 UTC, Gabor Kelemen (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gabor Kelemen (allotropia) 2022-01-11 19:54:49 UTC
Created attachment 177467 [details]
The Extensions: Color Palette dialog in current master

Since 7.3 there is a More extensions icon next to the color Palette selector dropdown on the Area tab -> Color page.
When opened the Extensions: Color Palette dialog is empty, although there are some downloadable color palette extensions on the website: 
https://extensions.libreoffice.org/?Tags%5B%5D=51

To reproduce:
1, Right click in an empty Writer document - Paragraph 
2, Go to Area tab, press Color button
3, Click the "Add colors via extension" button next to the Palette dropdown

The dialog should display some search results.

Version: 7.4.0.0.alpha0+ / LibreOffice Community
Build ID: bf883027ee62ece0844730572305094f53daa521
CPU threads: 8; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: hu-HU (hu_HU.UTF-8); UI: en-US
Calc: threaded

Same in 7.3, in 7.2 there was no such button.
Comment 1 Gabor Kelemen (allotropia) 2022-01-11 21:27:46 UTC
console warning in a debug build:

warn:ucb.ucp.webdav.curl:19430:19604:ucb/source/ucp/webdav-curl/CurlUri.cxx:122: curl_url_set failed: 3
warn:cui.dialogs:19430:19604:cui/source/dialogs/AdditionsDialog.cxx:86: CreateStream <https://extensions.libreoffice.org/api/v0/Color Palette.json> failed
Comment 2 Julien Nabet 2022-01-11 21:40:57 UTC
On pc Debian x86-64 with master sources updated today, I could reproduce this.

I got same console logs as you.

Some gdb debug show:
http_dav_ucp::CurlUri::CurlUri (this=0x7faeab39af20, rURI=u"https://extensions.libreoffice.org/api/v0/Color Palette.json")

since LO goes into if (uc != CURLUE_OK), here's the value of uc:
CURLUE_MALFORMED_INPUT

Michael: I tried this patch and it worked:
diff --git a/ucb/source/ucp/webdav-curl/CurlUri.cxx b/ucb/source/ucp/webdav-curl/CurlUri.cxx
index 035c12a132ef..1e96d7b140f3 100644
--- a/ucb/source/ucp/webdav-curl/CurlUri.cxx
+++ b/ucb/source/ucp/webdav-curl/CurlUri.cxx
@@ -116,7 +116,7 @@ CurlUri::CurlUri(::std::u16string_view const rURI)
 
     // use curl to parse the URI, to get a consistent interpretation
     OString const utf8URI(OUStringToOString(rURI, RTL_TEXTENCODING_UTF8));
-    auto uc = curl_url_set(m_pUrl.get(), CURLUPART_URL, utf8URI.getStr(), 0);
+    auto uc = curl_url_set(m_pUrl.get(), CURLUPART_URL, utf8URI.getStr(), CURLU_ALLOW_SPACE);
     if (uc != CURLUE_OK)
     {
         SAL_WARN("ucb.ucp.webdav.curl", "curl_url_set failed: " << uc);


Should we use CURLU_ALLOW_SPACE or should the url be encoded in a specific way?
Comment 3 Gabor Kelemen (allotropia) 2022-01-11 22:43:01 UTC
Created attachment 177472 [details]
The Color Palette extensions dialog after the proposed patch in qtz locale

Proposed patch: https://gerrit.libreoffice.org/c/core/+/128306
Comment 4 Commit Notification 2022-01-12 01:40:39 UTC
Gabor Kelemen committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/348e0651cc5add15ac03b11dde08057cf33f9b16

tdf#146703 Fix URL encoding when querying extensions

It will be available in 7.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 5 Commit Notification 2022-01-12 17:11:50 UTC
Gabor Kelemen committed a patch related to this issue.
It has been pushed to "libreoffice-7-3":

https://git.libreoffice.org/core/commit/b444c8394ab57203cefe25d8cbb4dbe08e5ee19c

tdf#146703 Fix URL encoding when querying extensions

It will be available in 7.3.0.2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 Commit Notification 2022-01-14 12:49:22 UTC
Gabor Kelemen committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/b1ec326619f7b91e56252b992159fd00bbff2ba7

tdf#146703 Rework previous fix to query extension metadata

It will be available in 7.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 7 Commit Notification 2022-01-14 15:39:42 UTC
Gabor Kelemen committed a patch related to this issue.
It has been pushed to "libreoffice-7-3":

https://git.libreoffice.org/core/commit/9862ce925429e5a2f7f75f654f798f55b33e8bcf

tdf#146703 Rework previous fix to query extension metadata

It will be available in 7.3.1.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 BogdanB 2022-01-26 15:22:55 UTC
Verified. Working well in
Version: 7.4.0.0.alpha0+ / LibreOffice Community
Build ID: 0c3b8792b712e939d2ad524d554f96616b4844be
CPU threads: 16; OS: Linux 5.13; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded