View Issue Details

IDProjectCategoryView StatusLast Update
0005922SOGoBackend Address Bookpublic2024-02-13 10:48
Reporteramair Assigned Tosebastien  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version5.9.1 
Fixed in Version5.10.0 
Summary0005922: VLIST missing in export and CardDAV
Description

Any groups in an address book are missing if you export the address book using SOGo's web interface. When accessing the address book's CardDAV URL using the "cadaver" tool groups are missing, too.

I tracked it down to the "isThunderbird" method that obviously doesn't work how it's used in SOGoGCSFolder.m. The attached patch fixes the problem.

As it works using demo.sogo.nu it might be a compiler issue. We build SOGo RPMs ourselves using gcc 11.3.1.

Steps To Reproduce

Go to any address book in the SOGo web interface. Add some users and a group containing those users. Open the 3-dots-menu of that address book and "Export" it. The group is missing.

TagsNo tags attached.

Activities

amair

amair

2024-02-08 13:07

reporter  

sogo-5.9.1-vlist.patch (410 bytes)   
diff -Nur SOGo-5.9.1/SoObjects/SOGo/WORequest+SOGo.h SOGo-5.9.1.debug/SoObjects/SOGo/WORequest+SOGo.h
--- SOGo-5.9.1/SoObjects/SOGo/WORequest+SOGo.h	2023-12-12 13:18:09.000000000 +0100
+++ SOGo-5.9.1.debug/SoObjects/SOGo/WORequest+SOGo.h	2024-02-08 09:29:20.956000000 +0100
@@ -37,6 +37,7 @@
 - (BOOL) isIPhoneAddressBookApp;
 - (BOOL) isAndroid;
 - (BOOL) isMacOSXCalendar;
+- (BOOL) isThunderbird;
 
 @end
 
sogo-5.9.1-vlist.patch (410 bytes)   
sebastien

sebastien

2024-02-08 17:08

administrator   ~0017573

It seems to be related to your build tools.
You need to create a pull request.

Sebastien

amair

amair

2024-02-12 10:24

reporter   ~0017579

As all the other "is" methods are defined in SoObjects/SOGo/WORequest+SOGo.h I'd say "isThunderbird" simply was forgotten. If it works by accident with your build tools, lucky you.
You have the patch, do whatever you want with it.

This is what GCC reports:

SOGoGCSFolder.m: In function ‘-[SOGoGCSFolder toOneRelationshipKeys]’:
SOGoGCSFolder.m:743:7: warning: ‘WORequest’ may not respond to ‘-isThunderbird’
743 |       if ([[context request] isThunderbird] && [self isKindOfClass: NSClassFromString(@"SOGoContactGCSFolder")]) {
|       ^~
SOGoGCSFolder.m: In function ‘-[SOGoGCSFolder _fetchFields:withQualifier:ignoreDeleted:]’:
SOGoGCSFolder.m:1196:3: warning: ‘WORequest’ may not respond to ‘-isThunderbird’
1196 |   if ([[context request] isThunderbird] && [self isKindOfClass: NSClassFromString(@"SOGoContactGCSFolder")]) {
|   ^~
sebastien

sebastien

2024-02-12 12:28

administrator   ~0017580

First of all, I agree the method is missing in the header file.
However, this is a warning and this should not mess up during runtime - that's why the compiler doesn't stop compiling.
This is why you can use reflection mechanism through respondsToSelector on objects, but you're probably unfamiliar with those concepts.

sebastien

sebastien

2024-02-13 10:48

administrator   ~0017581

For next time contributors must do pull request on github

Issue History

Date Modified Username Field Change
2024-02-08 13:07 amair New Issue
2024-02-08 13:07 amair File Added: sogo-5.9.1-vlist.patch
2024-02-08 17:08 sebastien Note Added: 0017573
2024-02-12 07:50 sebastien Priority high => normal
2024-02-12 07:50 sebastien Severity major => minor
2024-02-12 10:24 amair Note Added: 0017579
2024-02-12 12:28 sebastien Note Added: 0017580
2024-02-13 10:48 sebastien Assigned To => sebastien
2024-02-13 10:48 sebastien Status new => resolved
2024-02-13 10:48 sebastien Resolution open => fixed
2024-02-13 10:48 sebastien Fixed in Version => 5.10.0
2024-02-13 10:48 sebastien Note Added: 0017581