Closed ignoreigor closed 3 months ago
hi @ignoreigor , thx for the report. do you have a stacktrace of the error in the php logs?
@paulmhh can you have a look at this problem, too?
hi, there is no error in tine.log even after increasing the loglevel to DEBUG (8). But, after increasing the loglevel, a stacktrace is reported beneath the DAV-error when calling the suspicious container's URL via browser.
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
<s:exception>Exception</s:exception>
<s:message>Failed to parse time string (@2024-07-29 07:17:08) at position 8 (-): Double timezone specification</s:message>
<s:file>/var/www/vendor/sabre/dav/lib/DAV/Xml/Property/GetLastModified.php</s:file>
<s:line>43</s:line>
<s:code>0</s:code>
<s:stacktrace>#0 /var/www/vendor/sabre/dav/lib/DAV/Xml/Property/GetLastModified.php(43): DateTime->__construct()
#1 /var/www/vendor/sabre/dav/lib/DAV/CorePlugin.php(751): Sabre\DAV\Xml\Property\GetLastModified->__construct()
#2 /var/www/vendor/sabre/dav/lib/DAV/PropFind.php(95): Sabre\DAV\CorePlugin->Sabre\DAV\{closure}()
#3 /var/www/vendor/sabre/dav/lib/DAV/CorePlugin.php(748): Sabre\DAV\PropFind->handle()
#4 /var/www/vendor/sabre/event/lib/WildcardEmitterTrait.php(89): Sabre\DAV\CorePlugin->propFind()
#5 /var/www/vendor/sabre/dav/lib/DAV/Server.php(1052): Sabre\DAV\Server->emit()
#6 /var/www/vendor/sabre/dav/lib/DAV/Server.php(984): Sabre\DAV\Server->getPropertiesByNode()
#7 [internal function]: Sabre\DAV\Server->getPropertiesIteratorForPath()
#8 /var/www/vendor/sabre/dav/lib/DAV/Server.php(941): iterator_to_array()
#9 /var/www/vendor/sabre/dav/lib/DAV/Server.php(824): Sabre\DAV\Server->getPropertiesForPath()
#10 /var/www/vendor/sabre/dav/lib/DAV/Browser/Plugin.php(268): Sabre\DAV\Server->getPropertiesForChildren()
#11 /var/www/vendor/sabre/dav/lib/DAV/Browser/Plugin.php(133): Sabre\DAV\Browser\Plugin->generateDirectoryIndex()
#12 /var/www/vendor/sabre/event/lib/WildcardEmitterTrait.php(89): Sabre\DAV\Browser\Plugin->httpGet()
#13 /var/www/vendor/sabre/dav/lib/DAV/Server.php(472): Sabre\DAV\Server->emit()
#14 /var/www/vendor/sabre/dav/lib/DAV/Server.php(253): Sabre\DAV\Server->invokeMethod()
#15 /var/www/vendor/sabre/dav/lib/DAV/Server.php(321): Sabre\DAV\Server->start()
#16 /var/www/Tinebase/Server/WebDAV.php(303): Sabre\DAV\Server->exec()
#17 /var/www/Tinebase/Core.php(270): Tinebase_Server_WebDAV->handle()
#18 /var/www/index.php(24): Tinebase_Core::dispatchRequest()
#19 {main}</s:stacktrace>
</d:error>
thanks for the stacktrace, we'll have a look
Constructor of GetLastModified in both versions is the same (quick look), but isn't called in my working version.
It seems to be caused by mixed date formats, passed by $time. Normally you would expect an integer unix timestamp to parse it with '@' in case it isn't already a DateTime-object. But sometimes $time is a formatted string, so the preprended '@' crashes the format.
Is the problem only with me because fields in the database are not clean or are there different call sources of the constructor that cause the error?
the problem should be fixed with https://github.com/tine-groupware/tine/commit/0d9165c1823925229bef130ccb35f9b73594c900 thank you for reporting
the problem should be fixed with 0d9165c thank you for reporting
It works like a charm! Thank you!
Rehi, another error is thrown, concerning this issue. I think you'll have to look at Calendar/Frontend/WebDAV/Container.php and do the same thing.
HTTP RESPONSE
Response{protocol=h2, code=500, message=, url=https://www.frotzelei.de/calendars/4dc71a8074e8e5b3bd47a1de2e161154cc7e0afe/35/}
<?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
<s:exception>TypeError</s:exception>
<s:message>DateTime::__construct(): Argument #1 ($datetime) must be of type string, DateTimeImmutable given</s:message>
<s:file>/var/www/Tinebase/DateTime.php</s:file>
<s:line>114</s:line>
<s:code>0</s:code>
<s:stacktrace>#0 /var/www/Tinebase/DateTime.php(114): DateTime->__construct()
#1 /var/www/Calendar/Frontend/WebDAV/Container.php(283): Tinebase_DateTime->__construct()
#2 /var/www/vendor/sabre/dav/lib/CalDAV/Plugin.php(598): Calendar_Frontend_WebDAV_Container->calendarQuery()
#3 /var/www/vendor/sabre/dav/lib/CalDAV/Plugin.php(258): Sabre\CalDAV\Plugin->calendarQueryReport()
#4 /var/www/vendor/sabre/event/lib/WildcardEmitterTrait.php(89): Sabre\CalDAV\Plugin->report()
#5 /var/www/vendor/sabre/dav/lib/DAV/CorePlugin.php(690): Sabre\DAV\Server->emit()
#6 /var/www/vendor/sabre/event/lib/WildcardEmitterTrait.php(89): Sabre\DAV\CorePlugin->httpReport()
#7 /var/www/vendor/sabre/dav/lib/DAV/Server.php(472): Sabre\DAV\Server->emit()
#8 /var/www/vendor/sabre/dav/lib/DAV/Server.php(253): Sabre\DAV\Server->invokeMethod()
#9 /var/www/vendor/sabre/dav/lib/DAV/Server.php(321): Sabre\DAV\Server->start()
#10 /var/www/Tinebase/Server/WebDAV.php(303): Sabre\DAV\Server->exec()
#11 /var/www/Tinebase/Core.php(270): Tinebase_Server_WebDAV->handle()
#12 /var/www/index.php(24): Tinebase_Core::dispatchRequest()
#13 {main}</s:stacktrace>
</d:error>
Maybe something like
$timeRange['start'] = ($timeRange['start'] instanceof Tinebase_DateTime) ? $timeRange['start']->getTimestamp() : null;
$timeRange['end'] = ($timeRange['end'] instanceof Tinebase_DateTime) ? $timeRange['end']->getTimestamp() : null;
but that was maybe to trivial in this case.
this is actually a bug in Tinebase_DateTime, the new sabre.io dav library version provides DateTimeImmutables and Tinebase_DateTime can not be constructed with them, fixed that, will let you know once commit is available, thanks for reporting again
should be fixed in 7981d5023e4cab13f7307f70eb4eb2b085cd09bd
There is a problem with DAV-sync in weekly-2024.30.1. I got an error 500 when syncing /calendars/shared/51/
I found the corresponding event, by looking for the date. It's the modification date of an appointment that has been in the calendar for a long time. If I delete it, the same error is displayed with another appointment long in the past. In the database record of this event there are no abnormalities visible.
Going back to weekly-2024.29.1, the error is gone and sync works as usual.