Bug 486400 - Remote online quotes sources disappear from list of installed sources
Summary: Remote online quotes sources disappear from list of installed sources
Status: RESOLVED FIXED
Alias: None
Product: libalkimia
Classification: Frameworks and Libraries
Component: Online quotes widget (show other bugs)
Version: master
Platform: Other Other
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-01 11:17 UTC by Ralf Habacker
Modified: 2024-05-26 14:57 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 8.2


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf Habacker 2024-05-01 11:17:33 UTC
SUMMARY
From Jack Ostroff by email: 

STEPS TO REPRODUCE
1. download kmymoney snapshot build from master branch 
2. start kmymoney
3. open online quotes in settings
4. I clicked Install, searched for Yahoo, and installed the yahoo.com offer, 
5. Work with remote online quotes

OBSERVED RESULT
Then, at some point, the entry disappears from the Online Quotes dialog.  If i hit Install again, and search for yahoo, I get an error "Unknown Open Collaboration Service API error. (0)" and have to uninstall and then reinstall, but nothing actually seems to change. 

EXPECTED RESULT
The entry should not disappear
Comment 1 Jack 2024-05-03 22:04:07 UTC
In addition to the above, I just renamed the KMM price source "Yahoo Finance" to something else.  I then Installed the new Yahoo equity source, made a copy, and renamed the copy to "Yahoo Finance."  It worked for some downloads, but then, not only did the new source disappear from the list, the entry for "Yahoo Finance" showed the old source, not the newly copied/renamed one.  Once I uninstalled/reinstalled the new source, I had to redo the rename/copy/rename process.
Comment 2 Ralf Habacker 2024-05-23 11:52:33 UTC
(In reply to Ralf Habacker from comment #0)
> Then, at some point, the entry disappears from the Online Quotes dialog.  

The current implementation fetches all available remote online courses from the new stuff api and then determines which ones are installed. This does not seem to work stably. 

Another approach could solve this problem: The newstuff library stores the installed entries in a file called *.knsregistry, which is accessible via an API.
Comment 3 Ralf Habacker 2024-05-26 14:57:11 UTC
Git commit 7c13364d21c69ef66da41b802271668d1ccaf0f9 by Ralf Habacker.
Committed on 26/05/2024 at 12:26.
Pushed by habacker into branch 'master'.

Fix detecting installed entries when using knewstuff
FIXED-IN:8.2

A  +18   -0    3rdparty/KF4/knewstuff/CMakeLists.txt
A  +64   -0    3rdparty/KF4/knewstuff/knewstuff3/core/author.cpp     [License: LGPL (v2.1+)]
A  +97   -0    3rdparty/KF4/knewstuff/knewstuff3/core/author.h     [License: LGPL (v2.1+)]
A  +75   -0    3rdparty/KF4/knewstuff/knewstuff3/core/cache.h     [License: LGPL(v2.1+)]
A  +602  -0    3rdparty/KF4/knewstuff/knewstuff3/core/entryinternal.cpp     [License: LGPL (v2.1+)]
A  +423  -0    3rdparty/KF4/knewstuff/knewstuff3/core/entryinternal.h     [License: LGPL (v2.1+)]
A  +91   -0    3rdparty/KF4/knewstuff/knewstuff3/core/xmlloader.cpp     [License: LGPL (v2.1+)]
A  +87   -0    3rdparty/KF4/knewstuff/knewstuff3/core/xmlloader.h     [License: LGPL (v2.1+)]
A  +34   -0    3rdparty/KF4/knewstuff/knewstuff3/entry_p.h     [License: LGPL (v2.1+)]
M  +2    -1    CMakeLists.txt
M  +31   -47   src/alknewstuffengine.cpp
M  +5    -0    src/alknewstuffengine.h
M  +5    -0    src/alkonlinequotesprofile.cpp
M  +2    -0    src/alkonlinequotesprofile.h
M  +2    -2    src/alkonlinequotesprofile_p.cpp
M  +4    -3    src/alkonlinequoteswidget.cpp

https://invent.kde.org/office/alkimia/-/commit/7c13364d21c69ef66da41b802271668d1ccaf0f9