Intermesh / groupoffice

Group Office groupware and CRM
https://www.group-office.com
Other
193 stars 46 forks source link

ics file import broken #1175

Open lonesomewalker opened 2 months ago

lonesomewalker commented 2 months ago

GO: latest Server: Apache2 PHP: 8.1


PHP Fatal error:  During inheritance of IteratorAggregate: Uncaught ErrorException: Return type of GO\\Base\\Db\\Statement::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/customers/webs/office/office.domain.tld/go/base/db/Statement.php:578
Stack trace:
#0 /var/customers/webs/office/office.domain.tld/go/base/db/Statement.php(30): go\\core\\ErrorHandler::errorHandler()
#1 /var/customers/webs/office/office.domain.tld/go/GO.php(498): require('...')
#2 /var/customers/webs/office/office.domain.tld/go/base/db/Connection.php(174): GO::autoload()
#3 /var/customers/webs/office/office.domain.tld/modules/calendar/model/Category.php(118): GO\\Base\\Db\\Connection->createStatement()
#4 /var/customers/webs/office/office.domain.tld/go/base/db/ActiveRecord.php(3203): GO\\Calendar\\Model\\Category->afterSave()\n#5 /var/customers/webs/office/office.domain.tld...
lonesomewalker commented 2 months ago

Okay, to debug this further...

Attached is a working calendar ics sample. Okay, NOT attached, because github sucks in this case.

Raw:

BEGIN:VCALENDAR
VERSION:2.0
BEGIN:VEVENT
SUMMARY:sample-event
DTSTART:20240908T120000Z
DTEND:20240909T110000Z
DTSTAMP:20240903T111105Z
UID:1725361865611-samplevent
DESCRIPTION:sample description
LOCATION:Berlin Tiergarten
ORGANIZER:sample organizer
STATUS:CONFIRMED
PRIORITY:0
END:VEVENT
END:VCALENDAR

Unfortunately so we can not test the difference between CRLF and LF...

lonesomewalker commented 2 months ago

This one is not valid for GO, but validates everywhere:

BEGIN:VCALENDAR
PRODID:-//Mozilla.org/NONSGML Mozilla Calendar V1.1//EN
VERSION:2.0
BEGIN:VTIMEZONE
TZID:Europe/Amsterdam
BEGIN:STANDARD
DTSTART:19961027T030000
TZOFFSETTO:+0100
TZOFFSETFROM:+0200
RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:19810329T020000
TZOFFSETTO:+0200
TZOFFSETFROM:+0100
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
DTSTAMP:20240823T084252Z
UID:80462778A326E04EBD831336D01F2A2F2B87D2F092599B40A7D97331B7C7B182040000008200E00074C5B7101A82E00800000000C05E541C49F5DA01000000000000000010000000
SUMMARY:another sample event
PRIORITY:5
ORGANIZER;CN=Max Mustermann:mailto:info@example.org
CATEGORIES:Privat
DTSTART;TZID=Europe/Amsterdam:20240905T160000
DTEND;TZID=Europe/Amsterdam:20240905T180000
CLASS:PUBLIC
TRANSP:OPAQUE
X-MICROSOFT-CDO-BUSYSTATUS:BUSY
X-MICROSOFT-CDO-INTENDEDSTATUS:BUSY
X-LABEL:10
SEQUENCE:0
X-ALARM-TRIGGER:-PT15M
X-NEXT-ALARM:20240905T134500Z
BEGIN:VALARM
ACTION:DISPLAY
TRIGGER:-PT15M
DESCRIPTION:another sample event
END:VALARM
BEGIN:VALARM
ACTION:NONE
TRIGGER;VALUE=DATE-TIME:19760401T005545Z
UID:788b209a-cae8-47c4-8052-d8cbfc050971
END:VALARM
END:VEVENT
END:VCALENDAR
mschering commented 1 month ago

Are you using PHP 8.3? It's a compatibility issue. I've fixed it in the attached commit.

lonesomewalker commented 1 month ago

No, as recommended PHP8.1 Will check the fix.