Bug 266793 - Offline usage of dav resource fails
Summary: Offline usage of dav resource fails
Status: RESOLVED FIXED
Alias: None
Product: Akonadi
Classification: Unclassified
Component: DAV Resource (show other bugs)
Version: unspecified
Platform: Fedora RPMs Linux
: NOR major (vote)
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-21 09:44 UTC by Christoph Kaulich
Modified: 2011-04-30 14:44 UTC (History)
3 users (show)

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 Christoph Kaulich 2011-02-21 09:44:08 UTC
Version:           unspecified (using KDE 4.6.0) 
OS:                Linux

I am trying to set set up the uage of dav offline use. 
When I start KDE connected to the network, the dav resource goes to on line mode, and everything works as expected. 
When I start KDE not connected to net network, the resource as well goes in online mode a I ge a crash notification. Toggling the state to offline in the Akonadi console doesn't help. Adding an event in offline mode, this event does not show up on the server after switching back to online mode.

The server used is egroupware 1.8.

If you have any questions, feel free to contact me.

Reproducible: Didn't try
Comment 1 Christoph Kaulich 2011-02-21 09:52:46 UTC
Additional info:

The connectivity is managed by the network manager, so KDE should be aware of the network status.
Comment 2 Grégory Oestreicher 2011-02-21 10:21:51 UTC
Hi Christoph,

For the resource crash, I think this was fixed by a recent commit in master, can you confirm please?

For the offline mode capabilities I'll check what, if any, can be done at the resource level.

Cheers,
Grégory
Comment 3 Christoph Kaulich 2011-02-21 10:51:50 UTC
Hi Gregory, 

where do I get the master with the fixes?

From kde-pim mailing list where I was asking about offline usage, I got the following answer from Thomas McGuire:

*************

Hi,

On Wednesday 16 February 2011 12:33:03 Christoph Kaulich wrote:
> I have just tried to setup akonadi (KDEPIM 4.6 beta4 ) for offline use. I
> switched the folder properties for tasks and calender so keeping content
> locally for a week. So if I start my laptop offline, I can see all my
> calendar data.
> 
> Is there a way to write back data, which I added while being offline? I am
> using the dav resource on a groupdav calendar.

Write back should happen automatically when you are online again. Maybe you 
need to manually sync the calendar folder, that action is probably in the 
right-click menu.
If that doesn't work, I suspect a bug in the dav resource, please file a bug 
report then.

*************

So I think the offline/online switch should be respected in the resources.

Christoph
Comment 4 Grégory Oestreicher 2011-02-21 17:05:53 UTC
Hi Christophe,

> where do I get the master with the fixes?

This is the Git repository that you can browse at
http://quickgit.kde.org/kdepim-runtime.git. Then I realized too late that you were
using Fedora-provided RPMs. I don't know what is their packaging policy, but you'll
have to wait for an update on their side or recompile the resource yourself.

> From kde-pim mailing list where I was asking about offline usage, I got the
> following answer from Thomas McGuire:

Yup, I saw this but I haven't answered as I thought this was managed by Akonadi and
not by the resources. I'll look into this and update this report once I have some
grasp of how to do this.

Cheers,
Grégory
Comment 5 Christoph Kaulich 2011-02-21 19:11:24 UTC
just for curiosity, do you have a timeframe for that?

I will try to recompile the resource, when i have some time an report back about the crashes.
Comment 6 Grégory Oestreicher 2011-02-21 21:35:28 UTC
> just for curiosity, do you have a timeframe for that?

I've coded a first test, and now it's testing time here. Once I'm satisfied 
with the result I'll push to Git and CC this report.

Cheers,
Grégory
Comment 7 Grégory Oestreicher 2011-02-21 22:24:21 UTC
Git commit 4856b33bd0b4e6e2a6e3aa77512e4a34f01d2e81 by Gregory Oestreicher.
Committed on 21/02/2011 at 22:22.
Pushed by goestreicher into branch 'master'.

Add support for online / offline mode.

CCBUG: 266793

M  +11   -1    resources/dav/resource/davgroupwareresource.cpp     
M  +1    -0    resources/dav/resource/davgroupwareresource.h     

http://commits.kde.org/kdepim-runtime/4856b33bd0b4e6e2a6e3aa77512e4a34f01d2e81
Comment 8 Christoph Kaulich 2011-02-22 08:09:07 UTC
Hi Gregory, 

thanks for that quick work. I just compiled the new resource and it seems to work if I toggle the resource manually in the akonadi console. Then the collections are synced and everything works fine. 

Do you know i there is any possibility to connect the resource to the network manger, so it goes to offline state automatically when there is no network connection?

Many thanks again, 

Christoph
Comment 9 Grégory Oestreicher 2011-04-30 14:44:41 UTC
Hi,

I forgot to CC: this report, but the network dependency was added on March 24th.

Cheers,
Grégory