Skip to content
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

Photos doesn't load photos with 400 on SEARCH request #2117

Closed
ShGKme opened this issue Nov 10, 2023 · 2 comments · Fixed by #2119
Closed

Photos doesn't load photos with 400 on SEARCH request #2117

ShGKme opened this issue Nov 10, 2023 · 2 comments · Fixed by #2119
Labels
0. Needs triage Pending approval or rejection. This issue is pending approval. bug Something isn't working

Comments

@ShGKme
Copy link
Contributor

ShGKme commented Nov 10, 2023

Describe the bug

Photos doesn't load photos.

To Reproduce
Steps to reproduce the behavior:

  1. Open master photos on the current master server
  2. Request fails with 400 and response:
SEARCH /remote.php/dav/

Request Payload:

<?xml version="1.0" encoding="UTF-8"?>
			<d:searchrequest xmlns:d="DAV:"
				xmlns:oc="http://owncloud.org/ns"
				xmlns:nc="http://nextcloud.org/ns"
				xmlns:ns="https://github.com/icewind1991/SearchDAV/ns"
				xmlns:ocs="http://open-collaboration-services.org/ns">
				<d:basicsearch>
					<d:select>
						<d:prop>
							
	<d:getcontentlength />
	<d:getcontenttype />
	<d:getetag />
	<d:getlastmodified />
	<d:resourcetype />
	<nc:face-detections />
	<nc:face-preview-image />
	<nc:metadata-photos-size />
	<nc:metadata-photos-original_date_time />
	<nc:has-preview />
	<nc:realpath />
	<oc:favorite />
	<oc:fileid />
	<oc:permissions />
	<nc:nbItems />

						</d:prop>
					</d:select>
					<d:from>
						<d:scope>
							<d:href>/files/admin/</d:href>
							<d:depth>infinity</d:depth>
						</d:scope>
					</d:from>
					<d:where>
						<d:and>
							<d:or>
								
		<d:eq>
			<d:prop>
				<d:getcontenttype/>
			</d:prop>
			<d:literal>image/png</d:literal>
		</d:eq>
	
		<d:eq>
			<d:prop>
				<d:getcontenttype/>
			</d:prop>
			<d:literal>image/jpeg</d:literal>
		</d:eq>
	
		<d:eq>
			<d:prop>
				<d:getcontenttype/>
			</d:prop>
			<d:literal>image/heic</d:literal>
		</d:eq>
	
		<d:eq>
			<d:prop>
				<d:getcontenttype/>
			</d:prop>
			<d:literal>image/webp</d:literal>
		</d:eq>
	
		<d:eq>
			<d:prop>
				<d:getcontenttype/>
			</d:prop>
			<d:literal>video/mp4</d:literal>
		</d:eq>
	
		<d:eq>
			<d:prop>
				<d:getcontenttype/>
			</d:prop>
			<d:literal>video/quicktime</d:literal>
		</d:eq>
	
							</d:or>
							
							
						</d:and>
					</d:where>
					<d:orderby>
						<d:order>
							<d:prop><nc:metadata-photos-original_date_time/></d:prop>
							<d:descending/>
						</d:order>
					</d:orderby>
					<d:limit>
						<d:nresults>200</d:nresults>
						<ns:firstresult>0</ns:firstresult>
					</d:limit>
				</d:basicsearch>
			</d:searchrequest>

Request response 400 Bad Request:

requested order by property is not a valid property for this scope

Screenshots

image

Browser log

image

@ShGKme ShGKme added bug Something isn't working 0. Needs triage Pending approval or rejection. This issue is pending approval. labels Nov 10, 2023
@artonge
Copy link
Collaborator

artonge commented Nov 10, 2023

This probably happens when there is no metadata. @ArtificialOwl we need to discuss a solution.

@ArtificialOwl
Copy link
Member

ok, just had a look, working on a fix later tonight

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending approval or rejection. This issue is pending approval. bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants