Admin UI: enabling a birthday calendar for address book returns 500

Ouverte
#328 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Évaluation

Difficulté
3/5
Temps estimé
1-2 jours
Accessibilité débutants
65/100
Type d'issue
Bug
Clarté
Plutôt claire
Activité
Active
Stack technique
nginx, php, postgresql, symfony
Domaine
backend, databases

Piste de recherche

Start with src/Services/BirthdayService.php around line 348, where createCalendarObject() is called, and trace how birthday entries from an address book are handled during the admin save. Reproduce with a card that has a BDAY property and compare with an empty address book; done when enabling the birthday calendar succeeds and includes the card's birthday without returning a 500.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

bug
Davis version

v5.6.3

Installation method

NixOS module

PHP version (bare metal only)

8.5.12

Database

PostgreSQL

Reverse proxy

Nginx

Authentication method

Internal (ADMIN_LOGIN / ADMIN_PASSWORD)

Affected protocol(s)
  • CalDAV
  • CardDAV
  • WebDAV
  • Admin dashboard
  • API
Client(s) exhibiting the issue
  • Admin UI
Relevant environment variables
APP_ENV=prod
CALDAV_ENABLED=true
CARDDAV_ENABLED=true
WEBDAV_ENABLED=false
PUBLIC_CALENDARS_ENABLED=false
DATABASE_DRIVER=postgresql
DATABASE_URL=postgres://davis@localhost/davis?host=/run/postgresql
APP_TIMEZONE=Europe/Berlin

AUTH_METHOD unset
BIRTHDAY_REMINDER_OFFSET unset
Steps to reproduce
  1. Create a user with an address book containing at least one card (might need the BDAY property)
  2. Admin -> Address books -> Edit -> set "Include in birthday calendar" to Yes -> Save
  3. -> 500
Expected behaviour

Should create a shared birthday calendar containing the birthdays from the selected address book.

Actual behaviour

Creates an empty shared birthday calendar and fails with 500.
Running bin/console dav:sync-birthday-calendar <user> worked/fixed it correctly.

Logs
request.CRITICAL: Uncaught PHP Exception Error: "Call to a member function createCalendarObject() on null" at src/Services/BirthdayService.php line 348
Additional context

Creating a shared birthday calendar for a user with an empty address book showed no problems.

Possibly the same as #251, which couldn't be reproduced. Possible because it ran on an address book without (BDAY) entries.

Langage dominant
PHP
Étoiles
769
Forks
45
Merge moyen
2 j 9 h
PR mergées (30 j)
4

Préparer son environnement

Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de tchapi/davis

Toutes les issues de tchapi/davis

Issues similaires

Plus d'issues PHP

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.