Repository navigation
After updating to 20.0.6 Error: Undefined index is spamming log file聽#25338
Description
Activity
- added0. Needs triagePending check for reproducibility or if it fits our roadmapPending check for reproducibility or if it fits our roadmap
on Jan 26, 2021 After 2 days operation log entry is currently not newly created.
Same thing here, when i search for something, this error appears.
Any update about this error?
Is this due to the Nextcloud update to 20.0.6, or was the calendar app updated at the same time?
And is the updated calendar app perhaps the reason of the message?Running NC-20.0.8, the index fails at the same line (1789)
Some investigation:
The line called before the failing one is searchPrincipalUri in CalDavBackend.php.
In this function at line 1769 the function getCalendarsForUser is called:
1769 $calendars = $this->getCalendarsForUser($principalUri);This function is defined at:
287 public function getCalendarsForUser($principalUri) {
....
418 is the last lineI diffed the CalDavBackend (from the backups I still had, 20.0.4, 20.0.5 and 20.0.7 and of course 20.0.8)
The only difference I found is between 20.0.4 and 20.0.5:`# cat nextcloud-20.0.4-5.diff
diff -u nextcloud-20.0.4-20210102/CalDavBackend.php nextcloud-20.0.5-20210130/CalDavBackend.php
--- nextcloud-20.0.4-20210102/CalDavBackend.php 2021-04-05 19:37:10.384502656 +0200
+++ nextcloud-20.0.5-20210130/CalDavBackend.php 2021-04-05 19:37:33.180104246 +0200
@@ -344,10 +344,7 @@
$principals = $this->principalBackend->getGroupMembership($principalUriOriginal, true);
$principals = array_merge($principals, $this->principalBackend->getCircleMembership($principalUriOriginal));-
$principals = array_map(function ($principal) { -
return urldecode($principal); -
}, $principals); -
$principals[]= $principalUri;
-
$principals[] = $principalUri; $fields = array_values($this->propertyMap); $fields[] = 'a.id';
@@ -2728,11 +2725,13 @@
* @PARAM string $uriName
* @PARAM string $uriOrigin
* @PARAM string $uriDestination-
* @param string $newUriName (optional) the new uriName */
-
public function moveCalendar($uriName, $uriOrigin, $uriDestination) {
-
public function moveCalendar($uriName, $uriOrigin, $uriDestination, $newUriName = null) { $query = $this->db->getQueryBuilder(); $query->update('calendars') ->set('principaluri', $query->createNamedParameter($uriDestination)) -
->set('uri', $query->createNamedParameter($newUriName ?: $uriName)) ->where($query->expr()->eq('principaluri', $query->createNamedParameter($uriOrigin))) ->andWhere($query->expr()->eq('uri', $query->createNamedParameter($uriName))) ->execute();
`
The diff is in the function that is included in failing code....Could it be that the removed code:
`# cat nextcloud-20.0.4-5.diff
diff -u nextcloud-20.0.4-20210102/CalDavBackend.php nextcloud-20.0.5-20210130/CalDavBackend.php
--- nextcloud-20.0.4-20210102/CalDavBackend.php 2021-04-05 19:37:10.384502656 +0200
+++ nextcloud-20.0.5-20210130/CalDavBackend.php 2021-04-05 19:37:33.180104246 +0200
@@ -344,10 +344,7 @@
$principals = $this->principalBackend->getGroupMembership($principalUriOriginal, true);
$principals = array_merge($principals, $this->principalBackend->getCircleMembership($principalUriOriginal));-
$principals = array_map(function ($principal) { -
return urldecode($principal); -
}, $principals); -
$principals[]= $principalUri;
-
$principals[] = $principalUri; $fields = array_values($this->propertyMap); $fields[] = 'a.id';
`
Is the reason for index issue???
When this is the case the indeed, the issue is to be logged with Nextcloud Calendar or even with the 3rd party providing apps/dav/lib/CalDAV/CalDavBackend.php....
-
Yesterday I added the lines that were removed back.
Before that the error msg was regularly seen in my log. Since adding the lines back, the error is no longer there.The lines to put back are:
(at line 349 in apps/dav/lib/CalDAV/CalDavBackend.php )# https://github.com/nextcloud/server/issues/25338 $principals = array_map(function ($principal) { return urldecode($principal); }, $principals);It looks like this code prevents the error messages...
Is this Issue still valid in NC21.0.3? If not, please close this issue. Thanks! :)
I can test it later today. I'll keep in touch in this ticket !
Reacted by Simon L.Having the issue on 20.0.10 and not having it anymore on 21.0.3.
It could be good if someone else confirms that the problem is fixed.Reacted by Johannes Reiff- ghost addedstaleTicket or PR with no recent activityTicket or PR with no recent activity
on Aug 1, 2021
How to use GitHub
Steps to reproduce
Expected behaviour
No new errors should be shown in log files
Actual behaviour
Following error is repeatedly shown in log file (
Server configuration
Operating system: Ubuntu 18.02
Web server: Nginx
Database: MariaDB
PHP version: 7.4.14
Nextcloud version: 20.0.6
Updated from an older Nextcloud/ownCloud or fresh install: Update from 20.0.5
Signing status:
Signing status
``` No errors have been found. ```List of activated apps:
App list
Nextcloud configuration:
Config report
Are you using external storage, if yes which one: no
Are you using encryption: no
Are you using an external user-backend, if yes which one: no