Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Birthdays: some show up, some don’t #3914

Closed
alexanderdd opened this issue Jan 25, 2022 · 24 comments · Fixed by nextcloud/server#30974 or nextcloud/server#31859
Closed

Birthdays: some show up, some don’t #3914

alexanderdd opened this issue Jan 25, 2022 · 24 comments · Fixed by nextcloud/server#30974 or nextcloud/server#31859
Labels
0. to triage Pending approval or rejection bug

Comments

@alexanderdd
Copy link

Steps to reproduce

We have a shared address book and enter birthday dates via the date picker.

Expected behaviour

all birthdays show up

Actual behaviour

Some birthdays show up in the birthday calendar, some don’t.
For the contacts whose birthdays don’t show up in calendar, it does not even help to change their birthday in the contacts webinterface nor in Thunderbird Cardbook. They just won’t show up at all.

I downloaded the birthday calendar as calDAV and looked for differences:

Birthdays that show up as expected
all the examples I saw were VERSION:3.0
some were PRODID;VALUE=TEXT:-//Thunderbird.net/NONSGML Thunderbird CardBook V37.6//DE
some were PRODID:-//Sabre//Sabre VObject 4.1.6//EN

Birthdays that don't show up as expected
some were VERSION:4.0
some were VERSION:3.0
some were PRODID:-//Nextcloud Contacts v3.5.1
some were PRODID:-//Sabre//Sabre VObject 4.1.6//EN

Calendar app

Calendar app version: Calendar 3.0.2

Client configuration

Browser: Firefox 96.0.1

Server configuration

Nextcloud Version: 22.2.3

Any ideas? Any other info you need?

I already asked here but did not get a solution https://help.nextcloud.com/t/birthdays-some-show-up-some-dont/130870

@alexanderdd alexanderdd added 0. to triage Pending approval or rejection bug labels Jan 25, 2022
@apotek
Copy link

apotek commented Feb 1, 2022

I'll just say that I have lots of contacts with birthdays, but when i go to the contact birthday calendar, it is completely empty. Downloading the contact birthday calendar data creates a calendar file with no records.

When I go to my contacts, I do see the birthdays there.

@max65482
Copy link
Contributor

max65482 commented Feb 2, 2022

Did you reimport contacts before you faced the issue? I can reproduce the following:

  1. Create birthday calendar.
  2. Import vcard contact. Contact and birthday show up correctly.
  3. Delete contact.
  4. Reimport vcard contact. The reimport finishes with "1 error". The contact shows up, the birthday does not.

The issue can be "resolved" by emptying the calendar trash can.

This seems, however, like a bug in nextcloud/server. Likely in server/apps/dav/lib/CalDAV/BirthdayService.php.
As far as I understand, the birthday event cannot be recreated because a deleted entry with the same UID already exists in the database.

@max65482
Copy link
Contributor

max65482 commented Feb 2, 2022

I opened a PR in nextcloud/server for the reimport issue. Let me know if that solves your problem. Otherwise, reproduction steps may help.

@alexanderdd
Copy link
Author

@szaimen please reopen.

No there were no reimports.

I can reproduce the situation described in my first comment, but I guess you cant reproduce it on your test server...

Let me know what else you need from me.

@apotek
Copy link

apotek commented Feb 8, 2022

I didn't realize this issue was specific to reimporting.

My issue is simply that birthdays don't show up in the calendar at all.

I can create a contact in nextcloud, give that contact a birthday ( say, April 1, 1970), and hey, April Fool's! When you go to April 1 in the calendar view, you will not see that birthday.

I can create a contact in the Contacts app in Mac OS. Assign a birthday. Let that contact sync. Go to that contact's date in the nextcloud birthday calendar and.... (drumroll please), no birthday on that date.

I can create a contact in my android contacts app. Assign a birthday. Let that sync. Go to that contact's date in the nextcloud birthday calendar and.....(canned audience laughter) ... no birthday on that date.

This used to work. But for the last several versions of nextcloud it does not.

If there is another thread that is for my issue, I'll take my comments there. I didn't mean to squat on a calendar import issue :)

@ChristophWurst ChristophWurst reopened this Feb 8, 2022
@alexanderdd
Copy link
Author

@apotek your issue seems to be different from mine (see my first post. No it's not about reimporting.) - please open a separate issue for your problem.

@ChristophWurst can you collapse all comments by @apotek and @max65482 ? They are not related to my issue.

Again: tell me if you need more info.

@max65482
Copy link
Contributor

As I already mentioned, reproduction steps (1., 2., ...) may help. Preferably based on a blank NC instance and with all relevant materials attached.

@diogogomes
Copy link

In my case all the contacts' birthdays have disappeared from the calendar but are still in the address book.

The only thing I have done recently was to update Nextcloud to version 22.2.5. I cannot tell if this situation was present in the previous version.

When I export the calendar I only get the following:

BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
PRODID:-//SabreDAV//SabreDAV//EN
X-WR-CALNAME:Contact birthdays
X-APPLE-CALENDAR-COLOR:#e9d859
REFRESH-INTERVAL;VALUE=DURATION:PT4H
X-PUBLISHED-TTL:PT4H
END:VCALENDAR

@max65482
Copy link
Contributor

max65482 commented Feb 22, 2022

I cannot reproduce this.
Can you share the export of one contact (redacted)? This should be a .vcf file.

@diogogomes
Copy link

diogogomes commented Feb 23, 2022

@max65482 I stripped a lot of personal information that I don't know if it makes some conflict. I left the "name" and birthday.

BEGIN:VCARD
VERSION:3.0
UID:74f8e26b-739f-48bb-b0e0-2395cdd98de9
X-EVOLUTION-FILE-AS:Test\, Birthday
PRODID;VALUE=TEXT:-//Sabre//Sabre VObject 4.1.6//EN
FN:Birthday Test
N:Test;Birthday;;;
BDAY;VALUE=DATE:19690507
REV;VALUE=DATE-TIME:20190623T165647Z
END:VCARD

@max65482
Copy link
Contributor

Thanks! Unfortunately, I could still not reproduce the issue. I tried with a blank 22.2.5 instance.
Could you check your calendar trash bin for deleted birthday events? This may be a lead.

@diogogomes
Copy link

Could you check your calendar trash bin for deleted birthday events?

You got it right!! The birthdays are all in the recycle bin. Is there any easy way to restore them for all users?

Thanks

@tcitworld
Copy link
Member

Remove them all and then wait a while or manually execute occ dav:sync-birthday-calendar

@max65482
Copy link
Contributor

max65482 commented Feb 23, 2022

Let's figure out how the birthdays got into the recycle bin: @tcitworld Can you point out situations where birthday events are deleted/updated automatically. Maybe we need to apply the changes in nextcloud/server#30974 elsewhere, too. Automatic functions should bypass the trash bin to avoid UID conflicts.

@alexanderdd
Copy link
Author

(Note that @apotek @Hydranet @diogogomes have a different issue and did not open a separate issue as I asked, and their comments were not collapsed as I asked. So this is a bit confusing here.)

I still have the problem described in the first post, now with Nextcloud 22.2.6 and calendar 3.2.2 and contacts 4.1.0

I think I narrowed it down a bit more. It must be a problem with sharing of addressbooks with other users.

We have an addressbook with birthday dates that userA shares with everyone (with writing permission). UserA can see all birthdays in calendar, also changes in the addressbook are seen in birthday calendar, so for userA, everything works as expected.
I, userB, see can only see some of those birthdays. And even when I edit the a problematic birthday in the shared addressbook, the birthday still doesnt show up in my calendar. As a test I downloaded one of those contacts that don't work as .vcf and imported into a different test instance. Everything works as expected.

Now, as a test, userA unshared the addressbook, and shared it again with everyone (write access).

Now everything still works for UserA, but userB and everyone else can see the addressbook (so sharing works), but cannot see any birthdays in the calendar at all. (yes the birthday calendar is activated)

There are no events in the trashbin, neither in userA nor userB.

Please help!

@max65482
Copy link
Contributor

max65482 commented Apr 5, 2022

I could now reproduce the error. Here are concise reproduction steps:

  • Log in as Admin
  • Install Calendar 3.2.2 and Contacts 4.1.0
  • Create an additional user
  • Create group and assign it to the additional user
  • Create address book
  • Create contact with birth date in new address book
  • Share address book with group of new user (with writing permission)
  • Log out and log in as additional user
  • Enable birthday calendar (disabled by default)
  • -> The additional user cannot see the birthday in the calendar

Possibly an issue in nextcloud/server (server/apps/dav/lib/CalDAV/BirthdayService.php)

@max65482
Copy link
Contributor

max65482 commented Apr 6, 2022

I opened #31859 in nextcloud/server to fix the issue.
@alexanderdd Please test the fix and share your result. Note that you might need the re-share the address book.

@alexanderdd
Copy link
Author

@max65482 thank you for your quick actions.

I can only test this fix once it gets rolled out to Nextcloud 22.X - I will try to keep an eye on it, but also feel free to post here when the fix is rolled out.

(Maybe it's good to rename this issue to "birthdays not shown for shared address books"? Because "Birthdays: some show up, some don’t" is not the issue I am facing anymore...)

@alexanderdd
Copy link
Author

alexanderdd commented Apr 22, 2022

@max65482 We are on NC23.0.3 / calendar 3.2.2 / contacts 4.1.0 now, and our hoster applied your fix.

Problem persists. Users that the address book was shared with can still not see birthdays, while the address book creator can. Yes I tried re-sharing. And I tried deactivating and reactivating brithday calendar.

@max65482
Copy link
Contributor

Ok, so your hoster has rebased 31859 onto the 23.0.3 release?
Can you verify that cron jobs are running regularly?

@alexanderdd
Copy link
Author

alexanderdd commented Apr 26, 2022

yes and yes.

There seems to be something wrong with the addressbook that we are sharing:

I just did a test with the fix active, which proves that the fix works: I created a testadressbook, added a person with a birthday, shared the addressbook with a group, members of the group can see the birthday, horaaay! But the users of the group can still not see any birthdays from the addressbook that I am trying to fix, even after re-sharing.

Any ideas?

Is there a way to verify that the addressbook has valid carddav entries? Maybe a way to strip unnecessary information like PRODID?

@max65482
Copy link
Contributor

I don't have any specific ideas anymore. But yes, it can help to look at the entries. What happens when you export a contact from your "problem" calendar and reimport it into a new shared calendar? Can group members see it? Maybe also try to modify the UID before reimporting (maybe UID conflicts are a problem).

@freumichCH
Copy link

@max65482 I can confirm, that the fix nextcloud/server@3ddd559 works with following setup:

NC23.0.12
Calendar 3.5.3
Contacts 4.2.3

I had to do a occ dav:sync-birthday-calendar to get the events into the calendars
is there any chance, that the fix also get back-ported to NC23 and NC24?

@max65482
Copy link
Contributor

As of now #31859 has not been reviewed. Maybe @tcitworld can comment?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. to triage Pending approval or rejection bug
Projects
None yet
7 participants