Bug 289719 - Akonadi Resources and KOrganizer Calendar Resources not in Sync
Summary: Akonadi Resources and KOrganizer Calendar Resources not in Sync
Status: RESOLVED UNMAINTAINED
Alias: None
Product: korganizer
Classification: Applications
Component: general (show other bugs)
Version: 0.9
Platform: Debian unstable Linux
: NOR major
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-24 09:07 UTC by Andreas Cord-Landwehr
Modified: 2017-01-07 21:37 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Cord-Landwehr 2011-12-24 09:07:01 UTC
Version:           0.9 (using KDE 4.7.3) 
OS:                Linux

I did the following: 
0. Initially a eGroupware resource was set up (both for calendar and addressbook)
1. I recognized that (at least) addressbook entries were not updated correctly at the remote server if changed at KAddressbook
2. I removed from KOrganizer (sic) the eGroupware resource
3. I recognized at Akonadi-Console that the resource-agent was removed correctly HOWEVER at the "Browser" list I can still see this collection
4. the resource also did not vanish from the resource list at KOrganizer (as well as Kaddressbook) 
5. Akonadi gives the following error messages for KOrganizer:
"Cannot connect to agent instance with identifier 'akonadi_davgroupware_resource_6', error message: 'Could not get owner of name 'org.freedesktop.Akonadi.Resource.akonadi_davgroupware_resource_6': no such name'" 
6. If trying to delete the resource again from KOrganizer I do not get any output by Akonadi
7. If trying to delete the resource from KAddressbook I get
void AgentManager::removeAgentInstance(const QString&) Agent instance with identifier "" does not exist

Reproducible: Always

Steps to Reproduce:
The deleted resource is still displayed after restarts of Akonadi as well as KOrganizer/KAddressbook/Kontact.

Actual Results:  
The deleted resource does not vanish from the calendar/addressbook listings.

Expected Results:  
It should vanish automatically, since adding data to them directly leads to data loss. (= as a user I can add data to deleted resource without any notification => I expect that this data should be gone if resource finally vanishes as it is already deleted)
If you think this cannot happen, please lower severity of this bug.

OS: Linux (i686) release 3.0.0-1-686-pae
Compiler: gcc
Comment 1 Andreas Cord-Landwehr 2011-12-29 19:33:58 UTC
I am still not sure how the resource got broken, but at least I can say why deleting these broken resources at KOrganizer does not work:
In file kdepim/korganizer/akonadicollectionview.cpp at line 506 (referring to current GIT) there is the following snippet that calls deletion:

      if ( instance.isValid() ) {
        Akonadi::AgentManager::self()->removeInstance( instance );
      }

But for the broken resources the call of instance.isValid() returns false. The reason is, that my broken resources, i.e., the "instance" object contains an empty string at instance->mIdentifier. Checking the presence of an identifier name is the validity check here. 
Hence somehow this string must got lost.
Comment 2 Andreas Cord-Landwehr 2012-01-02 21:09:54 UTC
Unfortunately, I still could not find a way yet to reproduce this problem. At least I found a way to resurrect the resources(and then to be able to delete them afterwards) == workaround.

To resurrect the resources I had to modify the file "~/.config/akonadi/agentsrc" and add a corresponding line at the block "[Instances]" for the resources without agents. Apparently, all the corresponding files in
* .kde/share/apps/akonadi-davgroupware/
* .config/akonadi/
* .kde/share/config/
for the resources still exist. It looks for me like the deletion of the agent broke somewhere after removing this config line. 

After adding the corresponding line and restarting Akonadi the agents reappeared at the Agents-List of Akonadi-Console.
Comment 3 Denis Kurz 2016-09-24 18:47:36 UTC
This bug has only been reported for versions before 4.14, which have been unsupported for at least two years now. Can anyone tell if this bug still present?

If noone confirms this bug for a Framework-based version of korganizer (version 5.0 or later, as part of KDE Applications 15.08 or later), it gets closed in about three months.
Comment 4 Denis Kurz 2017-01-07 21:37:02 UTC
Just as announced in my last comment, I close this bug. If you encounter it again in a recent version (at least 5.0 aka 15.08), please open a new one unless it already exists. Thank you for all your input.