Skip to content

fix: Fix "Failed to fetch collection list" when trying to open albums#3503

Closed
jancborchardt wants to merge 1 commit into
masterfrom
fix/album-loading-error
Closed

fix: Fix "Failed to fetch collection list" when trying to open albums#3503
jancborchardt wants to merge 1 commit into
masterfrom
fix/album-loading-error

Conversation

@jancborchardt
Copy link
Copy Markdown
Member

Before After
image image

Possibly related:


AI-assisted: GitHub Copilot (Claude Sonnet 4.6)

Prompt

I’m getting "Failed to fetch collection list" when trying to open albums. These are the errors from the browser console:

“https://nextcloud.local/apps-extra/profiler/css/profiler-toolbar.css” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff). Cityscapes        
The resource from “https://nextcloud.local/apps/comments/css/comments-tab.css” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff). Cityscapes
The resource from “https://nextcloud.local/apps/files_versions/css/sidebar-tab.css” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff).      
Cityscapes                                                                                                                                                                      
Uncaught TypeError: can't access property "Tab", OCA.Files.Sidebar is undefined                                                                                                 
    <anonymous> sidebar.ts:21                                                                                                                                                   
sidebar.ts:21:19                                                                                                                                                                
[ERROR] photos: Error fetching collection files                                                                                                                                 
Object { app: "photos", uid: "admin", level: 0, error: Error }                                                                                                                  
index.mjs:54:17                                                                                                                                                                 
[ERROR] photos: [PublicCollectionContent] Error fetching collection files                                                                                                       
Object { app: "photos", uid: "admin", level: 0, error: Error }                                                                                                                  
index.mjs:54:17                                                                                                                                                                 
XHR                                                                                                                                                                             
PROPFIND                                                                                                                                                                        
https://nextcloud.local/remote.php/dav/photos/admin/albums/Recent/                                                                                                              
[HTTP/2 500  161ms]                                                                                                                                                             
                                                                                                                                                                                
[ERROR] photos: Error fetching collection files                                                                                                                                 
Object { app: "photos", uid: "admin", level: 0, error: Error }                                                                                                                  
index.mjs:54:17                                                                                                                                                                 
[ERROR] photos: [PublicCollectionContent] Error fetching collection files                                                                                                       
Object { app: "photos", uid: "admin", level: 0, error: Error }                                                                                                                  
index.mjs:54:17                                                                                                                                                                 
XHR                                                                                                                                                                             
PROPFIND                                                                                                                                                                        
https://nextcloud.local/remote.php/dav/photos/admin/albums/Cityscapes/                                                                                                          
[HTTP/2 500  131ms]                                                                                                                                                             
                                                                                                                                                                                
[ERROR] photos: Error fetching collection files                                                                                                                                 
Object { app: "photos", uid: "admin", level: 0, error: Error }                                                                                                                  
index.mjs:54:17                                                                                                                                                                 
[ERROR] photos: [PublicCollectionContent] Error fetching collection files                                                                                                       
Object { app: "photos", uid: "admin", level: 0, error: Error }                                                                                                                  
index.mjs:54:17 

Output

The fix is clear: getDavPermissions() now requires a second FileInfo $parent argument, but PropFindPlugin.php only passes one. The $fileInfo variable is already available in the
  closure's outer scope.

The PROPFIND now returns HTTP 200 with all photos and their permissions (e.g. GDNVW). The fix works.

  Root cause: OCP\Files\DavUtil::getDavPermissions() was updated to require a second FileInfo $parent argument (used to compute rename permissions), but PropFindPlugin.php was still
  calling it with only one argument.

  Fix: Pass $fileInfo->getParent() as the second argument, reusing the $fileInfo variable already captured in the closure's outer scope.

AI-assisted: GitHub Copilot (Claude Sonnet 4.6)
Signed-off-by: Jan C. Borchardt <925062+jancborchardt@users.noreply.github.com>
@jancborchardt jancborchardt self-assigned this May 6, 2026
@jancborchardt jancborchardt added bug Something isn't working 3. to review Waiting for reviews feature: albums Related to the albums section labels May 6, 2026
@jancborchardt jancborchardt moved this to 🏗️ At engineering in 🖍 Design team May 6, 2026
@artonge
Copy link
Copy Markdown
Collaborator

artonge commented May 6, 2026

Closing in favour of #3475

Thanks anyway :)

@artonge artonge closed this May 6, 2026
@github-project-automation github-project-automation Bot moved this from 🏗️ At engineering to 🎉 Done in 🖍 Design team May 6, 2026
@jancborchardt jancborchardt deleted the fix/album-loading-error branch May 13, 2026 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews bug Something isn't working feature: albums Related to the albums section

Projects

Status: 🎉 Done

Development

Successfully merging this pull request may close these issues.

2 participants