6.0.0-alpha12
▾
Tasks
New Task
Search
▾
Others
Photos
Wiki
Development
Tickets
New Ticket
Search
Toggle Alerts Log
Help
7/16/25
H
istory
A
ttachments
C
omment
W
atch
Download
Comment on [#14945] CardDAV: Removing property values is broken
*
Your Email Address
*
Spam protection
Enter the letters below:
.__ ..__ .__.\ / | \ || \| | >< |__/\__||__/|__|/ \
Comment
> When a CardDAV client wants to change a property of an address book > entry, it just sends the new property value. Along with all other > properties of this entry, which _have a value_ (no matter if changed > or not). This works well with Horde. > > If the clients wants to _remove_ a property , the client just does > not send it. Instead it sends all other properties of the entry, > which _have a value_ (no matter if changed or not). > > Horde does not remove this (not sent) property . It just keeps its > former value. > That means it is impossible to remove property values via CardDAV. > Removing properties via Horde web frontend or ActiveSync works as expected. > > This misbeavior is coming from function davPutObject($collection, > $object, $data) > in turba/lib/Application.php > https://github.com/horde/turba/blob/master/lib/Application.php#L1107 > Horde only changes properties sent by CardDAV client , unsent > properties just stay within the former existing object, which then > get stored to database. > > My suggestion for improvement: > > Putting these lines before foreach ($contact as $attribute => $value) > { (between line 1104 and line 1105) > > // Set every property to null (except those starting > with '__') > foreach ($existing_contact->attributes as $attribute > => $value) { > if ( strpos($attribute, '__') !== 0 ) { > $existing_contact->setValue($attribute, null ); > } > } > // tags/categories should not be null, but empty string > $existing_contact->setValue( '__tags' , '' ); > > Looking forward to seeing this fixed. >
Attachment
Watch this ticket
N
ew Ticket
M
y Tickets
S
earch
Q
uery Builder
R
eports
Saved Queries
Open Bugs
Bugs waiting for Feedback
Open Bugs in Releases
Open Enhancements
Enhancements waiting for Feedback
Bugs with Patches
Enhancements with Patches
Release Showstoppers
Stalled Tickets
New Tickets
Horde 5 Showstoppers