-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Files REPORT verb doesnt return queried custom properties #11817
Comments
Sorry, suggested fix above is not that good... $propFind = new PropFind($filesUri . $node->getPath(), $requestedProps); to $propFind = new PropFind(ltrim($filesUri, '/') . $node->getPath(), $requestedProps); in apps/dav/lib/Connector/Sabre/FilesReportPlugin.phpFilesReportPlugin->prepareResponses($filesUri, $requestedProps, $nodes) that only internal propfind is called without initial '/'. |
@jhomola79 Could I ask you to send in your changes a pull request right here on GitHub? Then we can directly comment on the code changes with the context of the surrounding code. Thanks |
Hi, I have spent some time trying to setup and run phpunit tests but no success yet. So I will try to make poll request without test in short time. |
As I cannot reproduce the original issue anymore, I will close this ticket. If this is still happening please make sure to upgrade to the latest version. After that, feel free to reopen. |
Steps to reproduce
Expected behaviour
custom property value returns in response similar as it works for PROPFIND on affected resource
Actual behaviour
custom properties are never returned for files REPORT
Server configuration
Operating system: linux
Web server: apache
Database: postgres
PHP version: 7.0
Nextcloud version: (see Nextcloud admin page) 14.0.0
Updated from an older Nextcloud/ownCloud or fresh install: fresh install
Where did you install Nextcloud from: from downloaded archive
Maybe possible fix:
apps/dav/lib/Connector/Sabre/FilesReportPlugin.phpFilesReportPlugin->getFilesBaseUri
private function getFilesBaseUri($uri, $subPath) {
$uri = trim($uri, '/');
$subPath = trim($subPath, '/');
if (empty($subPath)) {
$filesUri = $uri;
} else {
$filesUri = substr($uri, 0, strlen($uri) - strlen($subPath));
}
$filesUri = trim($filesUri, '/');
if (empty($filesUri)) {
return '';
}
return '/' . $filesUri;
}
Do not
return '/' . $filesUri;
but only
return $filesUri;
Custom properties in column propertypath of properties db table are not stored with initial slash.
The text was updated successfully, but these errors were encountered: