Repository navigation
Closed
Labels
Description
Steps to reproduce
- Create a file "testprops.txt"
- Create a file "proppatch.txt" with the following contents:
<?xml version="1.0"?>
<d:propertyupdate xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns">
<d:set>
<d:prop>
<oc:testprop>Test property</oc:testprop>
</d:prop>
</d:set>
</d:propertyupdate>
- Run a PROPPATCH with curl using that file:
curl -X PROPPATCH -H "Content-Type: text/xml" --data-binary "@proppatch.txt" http://root:admin@localhost/owncloud/remote.php/webdav/testprops.txt`
- Run PROPFIND on that file:
curl -X PROPFIND http://root:admin@localhost/owncloud/remote.php/webdav/testprops.txt
Result:
<?xml version="1.0" encoding="utf-8"?>
<d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:oc="http://owncloud.org/ns">
<d:response>
<d:href>/owncloud/remote.php/webdav/testprops.txt</d:href>
<d:propstat>
<d:prop>
<oc:id>00000066oc11qbmm0afb</oc:id>
<oc:permissions>RDNVW</oc:permissions>
<d:getetag>"f9836b73ac0074b6b35b9b8efe815670"</d:getetag>
<d:getlastmodified>Mon, 15 Dec 2014 16:34:47 GMT</d:getlastmodified>
<d:getcontentlength>0</d:getcontentlength>
<d:resourcetype/>
<d:getcontenttype>text/plain</d:getcontenttype>
</d:prop>
<d:status>HTTP/1.1 200 OK</d:status>
</d:propstat>
</d:response>
</d:multistatus>
- Check the database:
select * from oc_properties where propertypath = '/testprops.txt';
+----+--------+----------------+----------------------------------+---------------+
| id | userid | propertypath | propertyname | propertyvalue |
+----+--------+----------------+----------------------------------+---------------+
| 2 | root | /testprops.txt | {http://owncloud.org/ns}testprop | Test property |
+----+--------+----------------+----------------------------------+---------------+
Expected result
PROPFIND should return the property "oc:testprop".
Actual result
The custom property "oc:testprop" doesn't appear in the result set.
The code to read properties is present but doesn't seem to work.
Versions
master (036456f)
@DeepDiver1975 @icewind1991 I guess this hasn't been tested since a while.
Found while trying to add a special "oc:tags" property: #12856
Activity
PVince81 commentedon Dec 15, 2014
Hmm seems to be related to the "properties that the client has requested". Since I didn't request any special properties, it seems to default to a smaller set of props.
PVince81 commentedon Dec 15, 2014
Okay I seem to be able to read it if I explicitly ask for it:
curl -X PROPFIND -H "Content-Type: text/xml" --data-binary "@propfind.txt" http://root:admin@localhost/owncloud/remote.php/webdav/testprops.txtGives:
So possible a duplicate of #11803
DeepDiver1975 commentedon Dec 15, 2014
FYI: litmus is testing this - as long as we execute litmus from time to time 🙊
PVince81 commentedon Feb 12, 2015
This is by design. Custom props must be requested explicitly.