[Kolab-devel] DAVException in iRony-0.2.7

Daniel Morlock daniel.morlock at gmail.com
Sat Sep 13 20:55:23 CEST 2014


Hi,

I backtraced the problem a bit: For the calendar listing, the method 
CalendarBackend::_read_calendars() is invoked. In this method, each 
folder gets its uid i.e. using $id = DAVBackend::get_uid($folder) as 
follows:

     /**
      * Helper method to extract folder UID metadata
      *
      * @param object \kolab_storage_folder Folder to get UID for
      * @return string Folder's UID
      */
     public static function get_uid($folder)
     {
         // UID is defined in folder METADATA
         $metakeys = array(self::IMAP_UID_KEY, 
self::IMAP_UID_KEY_PRIVATE, self::IMAP_UID_KEY_CYRUS);
         $metadata = $folder->get_metadata($metakeys);
         foreach ($metakeys as $key) {
             if (($uid = $metadata[$key])) {
                 return $uid;
             }
         }

         // generate a folder UID and set it to IMAP
         $uid = rtrim(chunk_split(md5($folder->name . 
$folder->get_owner() . uniqid('-', true)), 12, '-'), '-');
         self::set_uid($folder, $uid);

         return $uid;
     }

For unkown reason, the $uid cannot be retrieved from the metadata and 
the method generates a new $uid and tries to set it to IMAP using 
self::set_uid():

     /**
      * Helper method to set an UID value to the given IMAP folder 
instance
      *
      * @param object \kolab_storage_folder Folder to set UID
      * @param string Folder's UID
      * @return boolean True on succes, False on failure
      */
     public static function set_uid($folder, $uid)
     {
         if (!($success = $folder->set_metadata(array(self::IMAP_UID_KEY 
=> $uid)))) {
             $success = 
$folder->set_metadata(array(self::IMAP_UID_KEY_PRIVATE => $uid));
         }
         return $success;
     }

This method tries to set the given $uid as metadata for the given 
$folder object (which is from type "kolab_storage_folder"). But return 
value of $folder->set_metadata() is false, so the metadata was not set 
properly. This results in a temp-uid that is used when listing the 
calendars but is never stored. So when I click on this uid it doesn't 
exist anymore and result in the error stated in my first mail.


Any ideas?

Best,
Daniel.



On 2014-09-13 20:27, Daniel Morlock wrote:
> Hi,
> 
> I just updated from Kolab 3.1 to Kolab 3.2 and iRony from 0.2.3 to
> 0.2.7 and it seems that iRony can't find contacts and calendar events
> anymore. I enabled the DAV-Browser to check the CalDAV entries. I can
> access my account and see my calendars and address books e.g. at
> https://mydomain.de/irony/addressbooks/mymail@mydomain.de. But when I
> select an addressbook (or a calendar) to see the contacts or the
> events, I get the error:
> 
> <d:error><s:exception>Sabre\DAV\Exception\NotFound</s:exception><s:message>Addressbook
> with name '9a0b4616f17a-e3f6dd280b8a-f9094fd8' could not be
> found</s:message><s:sabredav-version>1.8.6</s:sabredav-version></d:error>
> 
> The addressbook and the calendars does exist since I can see and
> modify them with Roundcubemail and with "kolab list-messages
> user/myuser/Calendar at mydomain.de", I see a lot of messages in it. I
> also tried iRony 0.2.8 and get the same errors.
> 
> Any help is highly appreciated.
> 
> Thanks,
> Daniel.


More information about the devel mailing list