knewstuff could not find newly created category
Closed, ResolvedPublic

Description

With T10518 a new category has been created. Unfortunally knewstuff could not access this category.

I'm using the following knsrc config fiile:

[KNewStuff3]
ProvidersUrl=https://autoconfig.kde.org/ocs/providers.xml
Categories=Alkimia Online Quotes
TargetDir=alkimia/quotes
Uncompress=archive

knewstuff from kf5 showed the the following debug messages:

org.kde.knewstuff.core: Initializing KNSCore::Engine from ' "/home/ralf/src/alkimia/src/alkimia-quotes.knsrc" '
org.kde.knewstuff.core: Loading KNewStuff3 config: "/home/ralf/src/alkimia/src/alkimia-quotes.knsrc"
org.kde.knewstuff.core: Categories: ("Alkimia Online Quotes")
org.kde.knewstuff.core: Using registry file: "/home/ralf/.local/share/knewstuff3/alkimia-quotes.knsregistry"
org.kde.knewstuff.core: Loading KNS2 registry of files for the component: "alkimia-quotes"
org.kde.knewstuff.core: Cache read... entries: 0
org.kde.knewstuff.core: loading providers from "https://autoconfig.kde.org/ocs/providers.xml"
org.kde.knewstuff.core: No xml loader for this url yet, so create one and temporarily store that "https://autoconfig.kde.org/ocs/providers.xml"
org.kde.knewstuff.core: XmlLoader::load(): url: QUrl("https://autoconfig.kde.org/ocs/providers.xml")
org.kde.knewstuff.core: KNSCore::HTTPWorker::HTTPWorker(const QUrl&, KNSCore::HTTPWorker::JobType, QObject*)
QNetworkReplyHttpImplPrivate::_q_startOperation was called more than once QUrl("https://autoconfig.kde.org/ocs/providers.xml")
org.kde.knewstuff.core: XmlLoader::slotJobData()
org.kde.knewstuff.core: void KNSCore::HTTPWorker::handleFinished() QUrl("https://autoconfig.kde.org/ocs/providers.xml")
org.kde.knewstuff.core: Data for "https://autoconfig.kde.org/ocs/providers.xml" was fetched "(cached)"
org.kde.knewstuff.core: --Xml Loader-START--
org.kde.knewstuff.core: "<providers>\n <provider>\n <id>api.kde-look.org</id>\n <location>https://api.kde-look.org/ocs/v1/</location>\n <name>api.kde-look.org</name>\n <termsofuse>https://api.kde-look.org/content/terms</termsofuse>\n <register>https://api.kde-look.org/register</register>\n <services>\n <person ocsversion=\"1.6\"/>\n <content ocsversion=\"1.6\"/>\n </services>\n </provider>\n</providers>\n"
org.kde.knewstuff.core: --Xml Loader-END--
org.kde.knewstuff.core: slotProvidersLoaded
org.kde.knewstuff.core: Provider attributes: ""
org.kde.knewstuff.core: setting provider xml ""
org.kde.knewstuff.core: Added provider: "api.kde-look.org"
org.kde.attica: creating list job: QUrl("https://api.kde-look.org/ocs/v1/content/categories")
org.kde.knewstuff.core: base url of attica provider: "https://api.kde-look.org/ocs/v1/"
org.kde.knewstuff.core: Engine addProvider called with provider with id "https://api.kde-look.org/ocs/v1/"
org.kde.attica: executing Get request for QUrl("https://api.kde-look.org/ocs/v1/content/categories")
QNetworkReplyHttpImplPrivate::_q_startOperation was called more than once QUrl("https://api.kde-look.org/ocs/v1/content/categories")
org.kde.attica: received categories: 106
org.kde.knewstuff.core: loading categories: ("Alkimia Online Quotes")
org.kde.knewstuff.core: Could not find category "Alkimia Online Quotes"
org.kde.knewstuff.core: Initializing KNSCore::Engine from ' "/home/ralf/src/alkimia/src/alkimia-quotes.knsrc" '
org.kde.knewstuff.core: Loading KNewStuff3 config: "/home/ralf/src/alkimia/src/alkimia-quotes.knsrc"
org.kde.knewstuff.core: Categories: ("Alkimia Online Quotes")
org.kde.knewstuff.core: Loading KNS2 registry of files for the component: "alkimia-quotes"
org.kde.knewstuff.core: Cache read... entries: 0
org.kde.knewstuff.core: loading providers from "https://autoconfig.kde.org/ocs/providers.xml"
org.kde.knewstuff.core: No xml loader for this url yet, so create one and temporarily store that "https://autoconfig.kde.org/ocs/providers.xml"
org.kde.knewstuff.core: XmlLoader::load(): url: QUrl("https://autoconfig.kde.org/ocs/providers.xml")
org.kde.knewstuff.core: KNSCore::HTTPWorker::HTTPWorker(const QUrl&, KNSCore::HTTPWorker::JobType, QObject*)
org.kde.knewstuff.core: XmlLoader::slotJobData()
org.kde.knewstuff.core: void KNSCore::HTTPWorker::handleFinished() QUrl("https://autoconfig.kde.org/ocs/providers.xml")
org.kde.knewstuff.core: Data for "https://autoconfig.kde.org/ocs/providers.xml" was fetched "(cached)"
org.kde.knewstuff.core: --Xml Loader-START--
org.kde.knewstuff.core: "<providers>\n <provider>\n <id>api.kde-look.org</id>\n <location>https://api.kde-look.org/ocs/v1/</location>\n <name>api.kde-look.org</name>\n <termsofuse>https://api.kde-look.org/content/terms</termsofuse>\n <register>https://api.kde-look.org/register</register>\n <services>\n <person ocsversion=\"1.6\"/>\n <content ocsversion=\"1.6\"/>\n </services>\n </provider>\n</providers>\n"
org.kde.knewstuff.core: --Xml Loader-END--
org.kde.knewstuff.core: slotProvidersLoaded
org.kde.knewstuff.core: Provider attributes: ""
org.kde.knewstuff.core: setting provider xml ""
org.kde.knewstuff.core: Added provider: "api.kde-look.org"
org.kde.attica: creating list job: QUrl("https://api.kde-look.org/ocs/v1/content/categories")
org.kde.knewstuff.core: base url of attica provider: "https://api.kde-look.org/ocs/v1/"
org.kde.knewstuff.core: Engine addProvider called with provider with id "https://api.kde-look.org/ocs/v1/"
org.kde.attica: executing Get request for QUrl("https://api.kde-look.org/ocs/v1/content/categories")
org.kde.attica: received categories: 106
org.kde.knewstuff.core: loading categories: ("Alkimia Online Quotes")
org.kde.knewstuff.core: Could not find category "Alkimia Online Quotes"

Related Objects

habacker updated the task description. (Show Details)

There is another category not accessable

org.kde.knewstuff.core: Engine addProvider called with provider with id  "https://api.kde-look.org/ocs/v1/"
org.kde.attica: executing Get request for QUrl("https://api.kde-look.org/ocs/v1/content/categories")
org.kde.attica: received categories: 106
org.kde.knewstuff.core: loading categories:  ("Skrooge Report Templates")
org.kde.knewstuff.core: Could not find category "Skrooge Report Templates"
starbuck added a subscriber: starbuck.EditedFeb 28 2019, 5:26 PM

For the other category, I have the info that it was internally labelled "Skrooge report template", so this is what was searched and matched some time in the past.
Since then we never changed that, but if nowadays the exact DISPLAY name is used, we can certainly revise that.
Please double-check if internally the client looks for "Skrooge Report Templates" or "Skrooge report template".

The other category name for Skrooge is also "Skrooge quote source" instead of DISPLAY name "Skrooge Quote Sources".

The new category for Alkimia has no old name, so there is only DISPLAY name "Alkimia Online Quotes".

In skrooge there is used "Skrooge report template". I checked the skrooge report template category as a test only and reporting my results, because I did not know if the issue is located in the client or the store, so nothing need to be changed yet.
Is there any option, to see those internal informations from the category tree, may be as logged in user ?

The new category for Alkimia has no old name, so there is only DISPLAY name "Alkimia Online Quotes".

This works now, thanks for help. I'm going to add both categories to the client config to be able to get all entries.

Is there any option, to see those internal informations from the category tree, may be as logged in user ?

On a low level I can answer this question by myself. They are returned by https://api.kde-look.org/ocs/v1/content/categories.

It seems that noone cares about adding features to KDE store :-(

alex added subscribers: leinir, alex.May 18 2020, 3:38 PM

I have the same issue when I was playing around with the KRunner plugins.
The "App Runners" and "Web Runners" categories are not available.
Maybe @leinir can help :-) ?

Hello, I took a quick look at our source code and so at first glance I can see no problem.
I don't know if it's helpful, but I've included an example of an answer from our server below.

<?xml version="1.0" encoding="UTF-8"?>
<ocs>
    <meta>
        <status>ok</status>
        <statuscode>100</statuscode>
        <message/>
        <totalitems>127</totalitems>
    </meta>
    <data>
        <category>
            <id>296</id>
            <name>KDE Wallpaper 1024x768</name>
            <display_name>Abstract</display_name>
            <parent_id/>
            <xdg_type>wallpapers</xdg_type>
        </category>
        <category>
            <id>354</id>
            <name>Akonadi Email Providers</name>
            <display_name>Akonadi Email Providers</display_name>
            <parent_id/>
            <xdg_type/>
        </category>
        <category>
            <id>560</id>
            <name>Alkimia Online Quotes</name>
            <display_name>Alkimia Online Quotes</display_name>
            <parent_id/>
            <xdg_type/>
        </category>
.
.
.
.
        <category>
            <id>339</id>
            <name>Skrooge quote source</name>
            <display_name>Skrooge Quote Sources</display_name>
            <parent_id/>
            <xdg_type/>
        </category>
.
.
.
    </data>
</ocs>
alex added a comment.Jun 12 2020, 2:39 PM

Thanks for having a look!

I guess you are showing an reply for https://api.kde-look.org/ocs/v1/content/categories?

But there are still categories like "App Runners" and "Web Runners" missing.
But the data for the categories is available, for instance web runners: https://api.kde-look.org/ocs/v1/content/data?categories=629, they are just not shown in the category overview.

Thanks for the clarification. I added the missing categories in configuration and I hope it works as expected now. Are you missing anything else?

alex added a comment.EditedJun 12 2020, 6:21 PM

You are awesome 😎 That was it, thanks a lot!!!

alex added a comment.Dec 8 2020, 7:12 AM

Let my hijack this task again, could you please add https://store.kde.org/browse/cat/103 as a category to the API? In the knsrc file ProvidersUrl=https://distribute.kde.org/khotnewstuff/fonts-providers.xml is hardcoded and consequently only the ancient fonts from there are available. Or is that in any way intentional?

Can this be closed? For new tasks, it's best to open new ticket.

org.kde.knewstuff.core: Could not find category "Alkimia Online Quotes"

As I initial opened this bug, I can say, that the issue has been solved.

starbuck closed this task as Resolved.Jul 13 2021, 11:30 AM
starbuck claimed this task.

Great. Closing then.