Opened 2 years ago

Closed 2 years ago

#1487912 closed Bugs (worksforme)

bug found in rcube_contacts.php

Reported by: deltatech Owned by:
Priority: 5 Milestone: 0.6-beta
Component: Addressbook Version: git-master
Severity: normal Keywords:
Cc:

Description

Imported vcards get destroyed by line 541 in includes/rcube_contacts.php

The line was $vcard->reset(); After removing this line, imports work perfectly.

With the line present as it is in revision 4751, the only vcard fields that come thru is the name and email address because the reset destroys the rest of the information.

I am running revision 4751

Change History (2)

comment:1 Changed 2 years ago by deltatech

a correction to my original comment. removing the line $vcard->reset(); fixes the import problem but causes a major problem when editing an existing record. This is probably why the reset was put there originally.

So instead the correct change would be to run the reset but only IF there is no vcard present in the save_data

if( empty($save_data['vcard']) )
    $vcard->reset();

Now both imports and edits work perfectly

Last edited 2 years ago by deltatech (previous) (diff)

comment:2 Changed 2 years ago by thomasb

  • Resolution set to worksforme
  • Status changed from new to closed

I don't know what you're talking about. rcube_vcard::reset() only resets fields that are overridden by Roundcube when saving but leaves all other fields untouched. Proprietary fields such as X-ABUID survive import - edit - export.

Note: See TracTickets for help on using tickets.