mirror of
https://github.com/photoprism/photoprism.git
synced 2026-03-02 22:57:18 -05:00
Folders: Child paths may overwrite parent folder albums #2448
Labels
No labels
ai
android
api
auth
awesome
bug
bug
ci
cli
config
database
declined
deprecated
docker
docs 📚
documents
duplicate
easy
enhancement
enhancement
enhancement
epic
faces
feedback wanted
frontend
hacktoberfest
help wanted
idea
in-progress
incomplete
index
invalid
ios
labels
live
live
low-priority
macos
member-feature
metadata
mobile
nas
needs-analysis
no-coding-required
no-coding-required
observability
performance
places
please-test
plus-feature
priority
pro-feature
question
raspberry-pi
raw
released
released
released
research
resolved
security
sharing
tested
tests
third-party-issue
thumbnails
upgrade
upstream-issue
ux
vector
video
waiting
won't fix
won't fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/photoprism#2448
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @s0ren99 on GitHub (Dec 5, 2025).
Originally assigned to: @s0ren99 on GitHub.
Before You Continue
What Is Not Working as Documented?
(Sorry but I can't find a relevant issue.)
PhotoPrism is not showing parent folders even though the parent folders do contain valid accessible photos.
Example structure:
Observed Behavior in PhotoPrism's "Folders" View after indexing:
PhotoPrism shows only:
but NOT
The files in the missing parent folders (e.g. ins/abcbd/img001.jpg) are NOT appearing under "Search" view either, despite the files being accessible and visible via the Library > Originals view (which I would have preferred to use but unfortunately it doesn't seem to support ordering).
There are no permission issues — all files are visible in Jellyfin and on the file system, and the subfolders index normally.
This is not a flattening/hierarchy preference issue — the parent folders simply do not appear.
I'm not sure if a Complete Rescan would fix this but there are already 69140 items in Search. A Rescan would take a lot of time, which I don't want.
How Can We Reproduce It?
What Behavior Do You Expect?
What Could Be the Cause?
I have no idea.
Logs, Sample Files, or Screenshots
No response
Which Software Versions Do You Use?
On What Device Is PhotoPrism Installed?
Do You Use a Reverse Proxy, Firewall, VPN, or CDN?
No response
@graciousgrey commented on GitHub (Dec 5, 2025):
Thank you for your report. Unfortunately I cannot reproduce this issue.
Is it possible that the photos of the folder are in the review or private section or part of a stack?
https://docs.photoprism.app/user-guide/organize/review/
https://docs.photoprism.app/user-guide/organize/private/
https://docs.photoprism.app/user-guide/organize/stacks/
@s0ren99 commented on GitHub (Dec 5, 2025):
No, they are in the review or private section or part of a stack. I haven't even see any one of these sections on the toolbar.
And it's not one "folder" but all folders that have sub-folders.
@graciousgrey commented on GitHub (Dec 5, 2025):
You can find these sections on the main navigation after you have clicked on the arrow down next to Search.
@s0ren99 commented on GitHub (Dec 5, 2025):
I see them now. Sorry I didn't read the doc carefully. Thanks for your guide.
While there are 7000+ photos in the review section, after I unclicked Quality Filter, the number of folders only increased by one with a lot of more parent folders being invisible.
@s0ren99 commented on GitHub (Dec 6, 2025):
It seems the root cause is PhotoPrism’s folder name normalization / beautification step.
My original folder structure contains many emoji-named subfolders, e.g.:
PhotoPrism changes how these folders are displayed in Folders view by capitalizing, removing underscores ( _ ), and otherwise “beautifying” the folder names.
For example:
ins/b._.rumeB. .RumeThe problem:
One of the emoji subfolders (🪞) gets normalized into the same name as its parent (Dloralyfo) in the UI.
Because of this naming collision, the actual parent folder
ins/dloralyfobecomes invisible in the Folders view, and all the other emoji-named subfolders under it also disappear from the UI.In short:
Parent folder =
DloralyfoEmoji subfolder 🪞 is normalized → also becomes
DloralyfoFolder view hides/conflicts with the real parent, making the entire level un-navigable.
This explains why PhotoPrism was showing only some subfolders and not the parent or the rest.
It seems that folder name normalization needs to either:
avoid collisions with parent names, or
allow disabling/overriding the normalization for folders.
@lastzero commented on GitHub (Dec 6, 2025):
PhotoPrism has full Unicode / UTF-8 support in its database, API, and user interface – emojis and non-ASCII characters in file and folder names should be handled correctly as long as the underlying filesystem uses a compatible encoding:
The symptoms you’re seeing are most likely caused by the filesystem or mount using a legacy / non-UTF-8 encoding, or by incorrect database charset / collation settings, as described in our MariaDB troubleshooting guide under “Unicode Support”:
https://docs.photoprism.app/getting-started/troubleshooting/mariadb/#unicode-support
PhotoPrism can only see whatever encoding the host file system and database expose inside the container.
Next step: @s0ren99, please open a terminal session in the PhotoPrism container and inspect the filesystem and locale settings (e.g.
locale,mount, andls -bin the affected directories), and verify the MariaDB charset and collation configuration. That will tell us how the filenames are actually encoded and help pinpoint where the mismatch occurs.@s0ren99 commented on GitHub (Dec 6, 2025):
Thanks for the detailed response! Just to clarify: the issue I’m reporting is NOT happening in Library > Originals, where PhotoPrism displays the folder names exactly as they appear on disk.
The problem occurs specifically in Folders view, where PhotoPrism normalizes the display name (capitalizing, removing characters, or treating emoji-named folders inconsistently). For example, a real folder like:
ins/dloralyfo/🪞shows up in Folders view with the name “Dloralyfo”, which causes conflicts and effectively hides the parent folder and other emoji-named siblings.
Another example:
So the file system itself is fine and the emoji names are correct — it’s the display normalization logic in Folders view that seems to be causing the mismatch.
Just clarifying so the investigation can focus on the Folders view name transformation rather than filesystem encoding.
@lastzero commented on GitHub (Dec 6, 2025):
I understand that, but I didn't want to flood you with screenshots:
@lastzero commented on GitHub (Dec 6, 2025):
We updated our MariaDB Troubleshooting Guide to provide more accurate advice and detailed examples:
@s0ren99 commented on GitHub (Dec 6, 2025):
Thanks for your guide.
compose.yamlincludes--character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ciinphotoprismandmariadbby default, so I didn't touch them.I'm not using a DSN.
"XFS always uses UTF-8 internally on Linux"
I have fixed the Locale and
ls -bis not displaying "raw UTF-8 bytes" anymore, but it still doesn't fix the folder name issue after aComplete Rescan.The logs show photos getting updated or new labels:
but the folders are simply not appearing in Folders view.
@s0ren99 commented on GitHub (Dec 7, 2025):
I tested the folder behavior again and the issue is now very clear.
A top-level emoji folder like /🏋🏻 displays correctly as 🏋🏻 in
Foldersview.However, an emoji folder inside another folder does not display its actual name. It instead shows the name of its parent folder.
For example:
/ins/🍷 shows up as Ins, not 🍷.
/ins/kate/🥰 shows up as Kate, not 🥰.
So it seems that Photoprism handles emoji folder names correctly only at the root level, but not when the emoji folder is a child directory.
Let me know if you need logs or additional examples. I’m happy to help test. Thanks again for your time!
@lastzero commented on GitHub (Dec 7, 2025):
Thanks for the additional information! We'll test it again and provide a fix if reproducible.
@lastzero commented on GitHub (Feb 10, 2026):
@s0ren99 We reproduced and confirmed the issue, which turned out to be a backend lookup bug rather than a filesystem encoding problem. The root cause was that folder albums were resolved by slug or path. Emoji child paths can normalize to the same slug as their parent. For example, ins/🍷 and ins both normalize to ins. This could cause the child folder to resolve/update the parent album entry, making folders appear to be missing or mislabeled in Folders view.
I started a new preview build so you can test this and provide feedback:
Please let us know if it works for you!
@lastzero commented on GitHub (Feb 11, 2026):
This issue is related and should also be resolved by yesterday's changes:
The root cause was confirmed to be a folder album slug collision. Different folder paths could normalize/truncate to the same
album_slug(80 chars), so one folder album entry could be reused/updated by another path.@s0ren99 commented on GitHub (Feb 12, 2026):
@lastzero Thank you for the commit! I’ve tested the latest preview build; unfortunately, this issue still persists.
In a directory with multiple emoji-named subfolders like:
PhotoPrism still seems to struggle with these as It is only picking up two of them.
How I reproduced it:
Insinstead of🍷@lastzero commented on GitHub (Feb 13, 2026):
@s0ren99 Thanks again for testing and providing the reproduction steps! We found and fixed another edge case related to folder names with emojis.
While the previous fix prevented new folder mix-ups, in some situations, an existing folder entry could still have the incorrect title (e.g. showing the parent name instead of the emoji subfolder name). I've now added an additional repair step to automatically correct these stale entries during indexing/updates while keeping edited folder titles intact.
Could you please test the preview build (
260213-4a07c1a53) again with your emoji subfolders and the move/cleanup/move-back workflow? If possible, please check cases like 🧩, ⛱️, 🌸, and "Work 😘" as well, and let us know the results.@s0ren99 commented on GitHub (Feb 13, 2026):
@lastzero Thank you again for your build. I've pulled and tested it (260213-postgres), but it still doesn't show the emoji folders correctly or doesn't show it at all:
@lastzero commented on GitHub (Feb 13, 2026):
The
photoprism/photoprism:260213-postgresimage was built from a PR/feature branch that does not yet include the fix:If you are using MariaDB, please test with the
photoprism/photoprism:previewimage:PostgreSQL support has not yet been released, so that version/image is expected to contain bugs.
@s0ren99 commented on GitHub (Feb 13, 2026):
@lastzero My apologies. I've changed it back to
photoprism/photoprism:previewand rundocker compose up -d --pull always. But docker didn't pull anything new and the emoji folder issue persists.@lastzero commented on GitHub (Feb 13, 2026):
In the page footer under Settings > General, do you see
Build 260213-4a07c1a53?If so, have you tested the move/cleanup/move-back workflow that you described, as well as a complete rescan of the affected folders?
Then, wait about 20 minutes so that the background worker has a chance to run, unless you have configured a longer wakeup interval. You can alternatively run the
photoprism momentscommand in a terminal.@s0ren99 commented on GitHub (Feb 14, 2026):
@lastzero Sorry. The command in the guide,
docker compose up -d --pull always, didn't pull anything for me;docker compose pulldid. And I had to rundocker compose downfirstly forBuild 260213-4a07c1a53to show.However, it still doesn't show /ins/🍷 correctly after move/cleanup/move-back. And I still don't see /ins/kelly/🌸 or /ins/kelly/💪 after a Rescan+Cleanup.