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

未关闭
#328 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
65/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
nginx, php, postgresql, symfony
领域
backend, databases

调研方向

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.

由索引模型根据 Issue 内容生成。

描述

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.

主要语言
PHP
星标
769
派生
45
平均合并
2 天 9 小时
30 天内合并 PR
4

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

tchapi/davis 的其他 Issue

查看 tchapi/davis 的全部 Issue

相似的 Issue

更多 PHP Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。