Korganizer: "An error occurred while creating a new tag"

"A. F. Cano" <[email protected]>
Newsgroups gmane.comp.kde.users.pim
Message-ID <[email protected]>
Hello,

I've had issues with to-do categories/tags for years.  Eearly on adding
a tag to a to-do item would duplicate it in the tag list and I regularly
had to go delete duplicates.  Now, even though I gather from the manual
that there are some preset tags/categories, selecting

Settings -> Manage Categories

brings up an empty "Manage Tags - KOrganizer" window, and when I try to
add one it pops up a "Failed to create a new tag - Korgznizer" window
that only says "An error occurred while creating a new tag", "OK".

My own categories don't show up either, even though they do
appear in the "Categories" column of the to-do list.

There is probably some corruption where my old categories are stored.
Does anybody know where this is?  My calendar is remote in a radicale
server.  Searching there, I see all the VCalendar calendar files and
they have what I would expect: the old ones have the CATEGORIES field,
the new ones (that I created while not being able to add categories)
don't.  Displaying the raw data with akonadi console shows the same.

This is under debian stable, up-to-date, with the following relevant
software:

mariadb	10.3.27
akonadi-server		4:18.08.3.7
akonadi-backend-mysql	4:18.08.3.7

In ~/.local/share/akonadi/akonadiserver.error I see:

Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)

And then this set of messages, apparently repeated every time I tried to
add a new tag/category:

DATABASE ERROR:
  Error code: "1452"
  DB error:  "Cannot add or update a child row: a foreign key constraint fails (`akonadi`.`tagtable`, CONSTRAINT `tagtable_ibfk_1` FOREIGN KEY (`parentId`) REFERENCES `tagtable` (`id`) ON DELETE CASCADE ON UPDATE CASCADE)"
  Error text: "Cannot add or update a child row: a foreign key constraint fails (`akonadi`.`tagtable`, CONSTRAINT `tagtable_ibfk_1` FOREIGN KEY (`parentId`) REFERENCES `tagtable` (`id`) ON DELETE CASCADE ON UPDATE CASCADE) QMYSQL3: Unable to execute statement"
  Query: "INSERT INTO TagTable (gid, typeId) VALUES (:0, :1)"
Error during insertion into table "TagTable" "Cannot add or update a child row: a foreign key constraint fails (`akonadi`.`tagtable`, CONSTRAINT `tagtable_ibfk_1` FOREIGN KEY (`parentId`) REFERENCES `tagtable` (`id`) ON DELETE CASCADE ON UPDATE CASCADE) QMYSQL3: Unable to execute statement"

A search for this error code found this:

https://bugs.archlinux.org/task/63025

But it is for a different distro and a more recent mariadb version
(10.4.6).  The workaround there is to downgrade to mariadb 10.3.16.
Since I'm running 10.3.27 I suspect it's unlikely that these minor
revisions are the cause of the problem.

And this:

https://forum.kde.org/viewtopic.php?f=215&t=124898

Which advises to rm ~/.config/akonadi/agent_config_akonadi_*_changes.dat

After doing that, the problem persists.

All the other references I found so far related to this error code are
years old.  I would hope the relevant bugs have been fixed.

I'm not familiar with the internal structure of the akonadi/korganizer
data, especially as it's stored in mariadb.  Is there a way to find if
my old categories are there and in a non-corrupted state? Where would
the default built-in categories/tags be?  What should I do next to try
to fix this issue?

Thanks.

Augustine
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.