Re: Keywords with id=0?
Robert Krawitz <rlk-FrUbXkNCsVf2fBVCVOL8/[email protected]> Sat, 14 Dec 2019 20:27:26 -0500 (EST)
| Newsgroups | gmane.comp.kde.kimdaba |
|---|---|
| Message-ID | <20191215012726.272B3424961@localhost> |
On Sun, 15 Dec 2019 00:46:26 +0100, Johannes Zarl-Zierl wrote: > Am Samstag, 14. Dezember 2019, 22:45:57 CET schrieb Robert Krawitz: >> I'm seeing that somehow my index.xml has an item with id=0. I'm not >> quite sure how it happened; I know I was using the preferences dialog >> to add a new member-group and then I created more member-groups under >> that. > > I can see several categories with id="0" as well. Checking my > index.xml backups it seems to be a long-standing issue: the first > category with id=0 was introduced in my index.xml in May 2017. By > itself, though that should not really be a problem (AFAICS id 0 is > not handled specially compared to other index numbers). I thought the indexes were supposed to start at 1, but OK. Let me know what it is, because I'm playing around with my kpa-merge script and can fix these problems. With an uncompressed file they're easy to fix, as the index isn't used for anything. With the compressed format it can't be fixed if there are duplicates. > What concerns me more though, is that categories with id=0 are > duplicated. I see the first instance of a duplicate id in December > 2017. It can't be triggered by routine operations, or I would expect > to see far more duplicates. I triggered it quite a bit the other night playing with the member-group dialog in the KPA settings page (which isn't where it belongs, as we've discussed, but that's a separate matter). I don't see evidence of items losing their ID later; the problem seems to be when they're newly created. Renaming *might* be exacerbating the problem. > So, two questions arise: > - What is the cause for the bug? I don't have a reproducible case yet, but it does appear to be related to the process of adding new itmes in the preferences dialog (or at least, it happens pretty often that way). > - How can we help users recover from this? Well, my kpa-merge script can clean this up as much as possible. -- Robert Krawitz <rlk-FrUbXkNCsVf2fBVCVOL8/[email protected]> *** MIT Engineers A Proud Tradition http://mitathletics.com *** Member of the League for Programming Freedom -- http://ProgFree.org Project lead for Gutenprint -- http://gimp-print.sourceforge.net "Linux doesn't dictate how I work, I dictate how Linux works." --Eric Crampton