Bug 108982 - journal entries from imap resource do not appear
Summary: journal entries from imap resource do not appear
Status: RESOLVED FIXED
Alias: None
Product: kresources
Classification: Unmaintained
Component: imap (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-12 12:39 UTC by Philipp Berndt
Modified: 2007-01-11 15:43 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Berndt 2005-07-12 12:39:42 UTC
Version:           3.4.1 (using KDE KDE 3.4.1)
Installed from:    Unlisted Binary Package
OS:                Linux

When I add a new journal entry and choose my imap server (kolab1) as resource,
save, close and restart kontact, the journal entry is gone from the journal view (though it exists in the imap folder).
Saving/loading to/from local resource works fine.

contents of entry in imap folder:
=================================
Content-Type: text/calendar;
  method=REQUEST;
  charset="utf-8"
From: ...
X-KMail-Fcc: sent-mail
Subject: iCal libkcal-1571067897.271
Date: Tue, 12 Jul 2005 11:47:41 +0200
User-Agent: KMail/1.8.1
MIME-Version: 1.0
Status: RO
X-Status: OC
X-KMail-EncryptionState:  
X-KMail-SignatureState:  
X-KMail-MDN-Sent:  
X-UID: 196

BEGIN:VCALENDAR
PRODID:-//K Desktop Environment//NONSGML libkcal 3.2//EN
VERSION:2.0
METHOD:REQUEST
BEGIN:VJOURNAL
DTSTAMP:20050712T094758Z
ORGANIZER:MAILTO:
CREATED:20050712T094739Z
UID:libkcal-1571067897.271
SEQUENCE:2
LAST-MODIFIED:20050712T094758Z
DESCRIPTION:test
SUMMARY:test journal
CLASS:PUBLIC
PRIORITY:5
DTSTART;VALUE=DATE:20050712
END:VJOURNAL

END:VCALENDAR



Package
========
Name        : kdepim                       Relocations: (not relocatable)
Version     : 3.4.1                             Vendor: The KDE-RedHat Project
Release     : 1.3.fc3.kde                   Build Date: Thu 30 Jun 2005 04:13:39 AM CEST
Build Host: sting-fc3.unl.edu
Source RPM: kdepim-3.4.1-1.3.fc3.kde.src.rpm
Packager    : kde-redhat Developers <http://kde-redhat.sf.net/>
URL         : http://pim.kde.org/
Summary     : PIM (Personal Information Manager) for KDE
Comment 1 Reinhold Kainhofer 2005-07-23 02:15:55 UTC
Reproducable in 3.4.1.
Comment 2 Robert Schouwenburg 2006-08-01 03:26:00 UTC
Still reproducable in 3.5.2 on Ubuntu. 
Comment 3 Stefan Haun 2006-08-24 21:55:30 UTC
This question may seem stupid, but do you use disconnected imap? As far as I know, this is necessary for the PIM items to be accessed via imap (although storing works fine, browsing is broken/impossible for direct imap access).
Comment 4 Robert Schouwenburg 2006-08-24 22:00:13 UTC
Yes, I use disconnected imap.
Comment 5 Jon Skanes 2006-11-01 23:40:50 UTC
I can confirm this bug.

I've tried a few different stock source builds of UW-IMAP recently. It seems to happen with them all: both 2004 and 2006 versions.  The latest version of KDE I've tried this with is 3.5.5-0ubuntu~dapper.

Here's the Ubuntu bug tracker:
https://launchpad.net/distros/ubuntu/+source/kdepim/+bug/26454

Here's my post to the Kubuntu forums:

Hi Everyone,

Before I report this as a bug, I'd like to see if anyone has had similar problems.

I'm running Kontact 1.2.3, Korganizer 3.5.5, Kmail 1.9.1 from the sources listed in the Kubuntu site news for KDE-3.5.5. My IMAP server is running UW-IMAP 2006c1 with 'mix' format mailboxes. The problem also occured when i was using 'mbx' format mailboxes. This seemed to effect KDE 3.5.[43] as well.

Every time I restart Korganizer all my journal entries disappear until I rebuild the IMAP cache in Kmail for each journal folder. I have two journal folders configured for the IMAP server; one is for personal info and is private, the other is a group shared IMAP resource. This effects both folders. There is no data loss that I can see, however, the time it takes to rebuild the IMAP cache is very annoying.

I had been hoping to role this out as a workgroup solution for some of my small business customers. It won't be feasible until i can get a solution. The amount of journal use for some of these customers is huge making rebuilds very intensive for network, server, and client resources.

I don't know a whole lot about IMAP, but could this have something to do with the message UIDs? I'm willing to spend a bit of time troubleshooting this if anyone can give me some suggestions.

Thanks,
Jon
Comment 6 Reinhold Kainhofer 2006-11-02 19:07:04 UTC
Reassigning all KOrganizer bug reports and wishes to the newly created 
korganizer-devel mailing list.
Comment 7 matt 2007-01-08 16:49:35 UTC
Is this a recurrence of 86610?  I'm still seeing this behavior.  I previously had my votes for 86610, which was resolved.  I've now placed those votes for this bug.  PLEASE!!!  :)
Comment 8 Allen Winter 2007-01-08 16:52:42 UTC
Are you using a more modern version of KDE?  The initial bug report mentions version 3.4.1

What version are you using?
Comment 9 matt 2007-01-08 17:05:00 UTC
KDE 3.5.5 on Kubuntu Dapper 6.10.
Korganizer 3.5.5
Kontact 1.2.3
Comment 10 Allen Winter 2007-01-08 17:57:08 UTC
Hmmm. I just tried this using Kolab resource.  And it seems to work fine.

I'm using the KOrganizer that will be released for KDE 3.5.6, although I don't recall any specific work in 3.5.6 that may have fixed it.

Reinhold: you should see a journal for today in our kdemail.net kolab resource.

Comment 11 matt 2007-01-08 21:10:31 UTC
Could this have to do with the fact that Korganizer has dorked with the storage over time?  I've been using the IMAP Journal resource for some time now, and the entries in this location date back to 9/15/2005.

During that time, the subject of Journal entries has changed, as has the structure.  My entries from 9/15/2005 - 4/18/2006 look like this:

Subject: iCal libkcal-2082749020.569
Kmail understand the content and places the entry in a little rubber-banded box.


From 7/5/2006 - 9/29/2006 look like this:

Subject: libkcal-1865126027.100
Kmail shows:
------------------------------------------------------
This is a Kolab Groupware object.
To view this object you will need an email client that can understand the Kolab Groupware format.
For a list of such email clients please visit
http://www.kolab.org/kolab2-clients.html
------------------------------------------------------


Then from 11/07/2006 - Present the entries look like this again (like the first example):
Subject: iCal libkcal-1245565591.189
Kmail understands the content and displays it in a rubber-banded box.

I can provide examples (view source of email) if it would be helpful.  I'm sure I can find a couple with non-confidential information.

Thanks,
Matt
Comment 12 matt 2007-01-08 21:13:07 UTC
Current and Original Format Example:
------------------------------------
Content-Type: text/calendar;
  method=REQUEST;
  charset="utf-8"
From: Matthew Carpenter <matt@eisgr.com>
Organization: Enterprise Information Systems
X-KMail-Fcc: .247543256.directory/Sent
Subject: iCal libkcal-738563283.977
Date: Wed, 28 Dec 2005 16:18:23 -0500
User-Agent: KMail/1.8.3
MIME-Version: 1.0
Status: RO
X-Status: OC
X-KMail-EncryptionState:  
X-KMail-SignatureState:  
X-KMail-MDN-Sent:  
X-UID: 58
X-Length: 847

BEGIN:VCALENDAR
PRODID:-//K Desktop Environment//NONSGML libkcal 3.2//EN
VERSION:2.0
METHOD:REQUEST
BEGIN:VJOURNAL
DTSTAMP:20051228T211823Z
ORGANIZER:MAILTO:
CREATED:20051228T211823Z
UID:libkcal-738563283.977
SEQUENCE:0
LAST-MODIFIED:20051228T211823Z
DESCRIPTION:Todo completed: Replace HArd Drive Ribbon to DVD drive
CLASS:PUBLIC
PRIORITY:5
DTSTART;VALUE=DATE:20051228
END:VJOURNAL

END:VCALENDAR

Comment 13 matt 2007-01-08 21:17:18 UTC
Inbetween Format Example:
-------------------------
From: Matthew Carpenter <matt@eisgr.com>
Organization: Enterprise Information Systems
X-KMail-Fcc: .1674498405.directory/.INBOX.directory/Sent
Subject: libkcal-1865126027.100
Date: Fri, 29 Sep 2006 07:22:22 -0400
User-Agent: KMail/1.9.1
MIME-Version: 1.0
X-Kolab-Type: application/x-vnd.kolab.journal
Content-Type: Multipart/Mixed;
  boundary="Boundary-00=_uHQHFHGRJ61JbBO"
Status: RO
X-Status: OT
X-KMail-EncryptionState:  
X-KMail-SignatureState:  
X-KMail-MDN-Sent:  
X-UID: 106
X-Length: 2133

--Boundary-00=_uHQHFHGRJ61JbBO
Content-Type: Text/Plain;
  charset="us-ascii"
Content-Transfer-Encoding: 7bit

This is a Kolab Groupware object.
To view this object you will need an email client that can understand the Kolab Groupware format.
For a list of such email clients please visit
http://www.kolab.org/kolab2-clients.html
--Boundary-00=_uHQHFHGRJ61JbBO
Content-Type: application/x-vnd.kolab.journal;
  name="kolab.xml"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
  filename="kolab.xml"

<?xml version="1.0" encoding="UTF-8"?>
<journal version="1.0" >
 <product-id>KOrganizer 3.5, Kolab resource</product-id>
 <uid>libkcal-1865126027.100</uid>
 <body>Mtg with client in about a month.  Need to get familiar with the new product.</body>
 <creation-date>2006-09-29T11:22:19Z</creation-date>
 <last-modification-date>2006-09-29T11:58:31Z</last-modification-date>
 <sensitivity>public</sensitivity>
 <summary>Discussion of project X</summary>
 <start-date>2006-09-29T04:00:00Z</start-date>
</journal>

--Boundary-00=_uHQHFHGRJ61JbBO--
Comment 14 Reinhold Kainhofer 2007-01-08 23:51:15 UTC
Am Mon J
Comment 15 Allen Winter 2007-01-08 23:58:26 UTC
>> Reinhold: you should see a journal for today in our kdemail.net kolab 
>> resource. 
  
 
> Which folder would that be? We don't have a journal folder in kdemail.net... 

Sorry, my mistake. I asked Matt to create a journal folder in kdemail.net.  Not sure when/if he'll get my message.  He's hard to reach these days.
 
So please ignore my "works in 3.5.6" message in Comment #10
Comment 16 Allen Winter 2007-01-09 17:10:53 UTC
SVN commit 621721 by winterz:

Fix for loading journals.

BUGS: 108982


 M  +8 -5      resourcekolab.cpp  


--- branches/KDE/3.5/kdepim/kresources/kolab/kcal/resourcekolab.cpp #621720:621721
@@ -249,7 +249,10 @@
 {
   removeIncidences( "Journal" );
   mCalendar.deleteAllJournals();
-  return doLoadAll( mJournalSubResources, journalAttachmentMimeType );
+  bool kolabStyle = doLoadAll( mJournalSubResources, journalAttachmentMimeType );
+  bool icalStyle = doLoadAll( mJournalSubResources, incidenceInlineMimeType );
+
+  return kolabStyle && icalStyle;
 }
 
 void ResourceKolab::removeIncidences( const QCString& incidenceType )
@@ -500,7 +503,7 @@
       mUidMap[ uid ] = StorageReference( subResource, sernum );
     } else {
       /* This is a real add, from KMail, we didn't trigger this ourselves.
-       * If this uid already exists in this folder, do conflict resolution, 
+       * If this uid already exists in this folder, do conflict resolution,
        * unless the folder is read-only, in which case the user should not be
        * offered a means of putting mails in a folder she'll later be unable to
        * upload. Skip the incidence, in this case. */
@@ -548,7 +551,7 @@
 
 bool ResourceKolab::addEvent( KCal::Event* event )
 {
-  if ( mUidMap.contains( event->uid() ) ) 
+  if ( mUidMap.contains( event->uid() ) )
     return true; //noop
   else
     return addIncidence( event, QString::null, 0 );
@@ -620,7 +623,7 @@
 
 bool ResourceKolab::addTodo( KCal::Todo* todo )
 {
-  if ( mUidMap.contains( todo->uid() ) ) 
+  if ( mUidMap.contains( todo->uid() ) )
     return true; //noop
   else
     return addIncidence( todo, QString::null, 0 );
@@ -657,7 +660,7 @@
 
 bool ResourceKolab::addJournal( KCal::Journal* journal )
 {
-  if ( mUidMap.contains( journal->uid() ) ) 
+  if ( mUidMap.contains( journal->uid() ) )
     return true; //noop
   else
     return addIncidence( journal, QString::null, 0 );
Comment 17 Reinhold Kainhofer 2007-01-09 17:25:14 UTC
Matt, Can you please check if the xml-style journals work for you? Allen just fixed the problem with iCalendar journals, but we couldn't see an obvious problem with xml journals. In particular, does the journal on 2006-09-29 appear in korganizer? 
The iCalendar Journal for 28-12-2005 should definitely not appear (as it was never loaded properly).

Thanks a lot, 
Reinhold
Comment 18 matt 2007-01-09 18:02:33 UTC
Now that you mention it, you are right.  The September entries show up!  I apologize that I didn't recognize that sooner.

How did I get two different types of entries?  Did they change between versions?  Have the settings changed significantly?

Yes, I realize that Kolab and iCal are both storage options.  
However, the Kolab selection does not allow me to specify a folder, just an IMAP account.  However, please don't ask why, have my groupware resources in "IMAPACCOUNT/Drafts/..."

How do I have both iCal and Kolab in that folder location?  I have indeed bounced between different machines at different times, using Kubuntu 5.10, 6.06, and 6.10 over the course of a year or so.  So I might have suspected that I selected differing settings, but that the Kolab option doesn't allow me to specify a folder.

Thanks!  And THANK YOU for fixing it :)
Comment 19 Reinhold Kainhofer 2007-01-11 15:43:00 UTC
Am Die J