https://bugs.kde.org/show_bug.cgi?id=415415

            Bug ID: 415415
           Summary: Renaming tag groups can produce tags with id=0
           Product: kphotoalbum
           Version: unspecified
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: XML backend
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

SUMMARY
Renaming tag groups can produce tags with id=0, which is a problem not just
because most code assumes that id != 0, but because it can lead to losing tag
data.
Especially, if more than one tag gets assigned the id=0 due to this bug, an
automatic recovery is not possible.

STEPS TO REPRODUCE
1. Create a new tag group under under an existing tag group.  For
   example, with the demo database, create a tag group named "dk"
   under Places->Denmark.
2. Rename said tag group.
3. Save.  The new group will have ID 0, accompanied by this message:
   kphotoalbum.XMLDB: Member "dk1" in group "Places" -> "Denmark" has
   no id!

Note that renaming an existing tag group, or creating one at top level
(e. g. under Places) does not trigger this.

The bug was at least present since mid 2017.

Note:
 - Thanks to Robert Krawitz for discovering bug and fixing the cause of it!
 - This bug report was created after the fact for documentation purposes.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to