Bug: Photos being sorted into incorrect date folders #1305

Closed
opened 2026-02-20 00:10:01 -05:00 by deekerman · 16 comments
Owner

Originally created by @jackch1 on GitHub (Jan 24, 2022).

Discussed in https://github.com/photoprism/photoprism/discussions/1965

When browsing Originals folder through photoprism, the wrong photos are returned. As you can see in the screenshot.
Files are in the correct folder on the disk.

Not sure what info you would need to recreate this so please let me know what else I can provide.

Original post added below:

Originally posted by jackch1 January 22, 2022
Hi

All my files have been added to photoprism via the import function, so I'm assuming should be copied/moved into the correct date folder during this process. However this doesnt seem to be the case.

  • Search/timeline view: Photos in correct order
  • Calendar view: Photos in correct month
  • Originals: Wrong dates

Screenshot of my May 2021 folder view:

Screenshot of May 2021 folder

Any ideas why this happend and how I can fix it?

My files are origianlly from Google Photos, I have checked the exif data and Json files and they are all correct (date/time etc).

Using PhotoPrism on Unraid Docker, latest version.
4 core i5 CPU
8GB Ram
Running on 2TB of SSD storage

Originally created by @jackch1 on GitHub (Jan 24, 2022). ### Discussed in https://github.com/photoprism/photoprism/discussions/1965 When browsing Originals folder through photoprism, the wrong photos are returned. As you can see in the screenshot. Files are in the correct folder on the disk. Not sure what info you would need to recreate this so please let me know what else I can provide. Original post added below: <div type='discussions-op-text'> <sup>Originally posted by **jackch1** January 22, 2022</sup> Hi All my files have been added to photoprism via the import function, so I'm assuming should be copied/moved into the correct date folder during this process. However this doesnt seem to be the case. - **Search/timeline view:** Photos in correct order - **Calendar view:** Photos in correct month - **Originals:** Wrong dates Screenshot of my **May 2021** folder view: <img width="858" alt="Screenshot of May 2021 folder" src="https://user-images.githubusercontent.com/43887297/150657744-cca4d40e-5f68-40b5-8a68-887aac06adc7.png"> Any ideas why this happend and how I can fix it? My files are origianlly from Google Photos, I have checked the exif data and Json files and they are all correct (date/time etc). Using PhotoPrism on Unraid Docker, latest version. 4 core i5 CPU 8GB Ram Running on 2TB of SSD storage</div>
Author
Owner

@jackch1 commented on GitHub (Jan 24, 2022):

220107-f5b7ef83-Linux-x86_64
Default database
Running on Unraid Docker
Viewing with Firefox - No plugins etc

@jackch1 commented on GitHub (Jan 24, 2022): 220107-f5b7ef83-Linux-x86_64 Default database Running on Unraid Docker Viewing with Firefox - No plugins etc
Author
Owner

@lastzero commented on GitHub (Jan 24, 2022):

Example / test files?

@lastzero commented on GitHub (Jan 24, 2022): Example / test files?
Author
Owner

@lastzero commented on GitHub (Jan 24, 2022):

Please follow our Bug Issue Template. We provide it for a reason ❤️

@lastzero commented on GitHub (Jan 24, 2022): Please follow our Bug Issue Template. We provide it for a reason ❤️
Author
Owner

@graciousgrey commented on GitHub (Jan 25, 2022):

PhotoPrism does not touch your originals directory in case you are using our index functionality (https://docs.photoprism.app/user-guide/library/). So PhotoPrism does not re-sort your photos unless you decided to use the import functionality.
The folders in the folder section (https://docs.photoprism.app/user-guide/organize/folders/) and in the originals section (https://docs.photoprism.app/user-guide/library/files/) display how your original files are sorted.
In the calendar section photos are displayed in months based on the date that is read from their metadata (https://docs.photoprism.app/user-guide/organize/calendar/).

Did I get you right:

  1. You have a folder "May 2021" in your originals.
  2. All photos that are in this folder in your originals location are from May 2021
  3. You indexed your files.
  4. In the calendar section all photos of this folder are all located in the correct month
  5. On the details tab of the photos that are in this folder (https://docs.photoprism.app/user-guide/organize/edit/#open-edit-dialog) you see the correct date
  6. But in the list view within the folder section you see a wrong date? And these dates do not match the dates on the details tab?
  7. Or do you see different files in the folder within the folder section than in the folder within your originals?
@graciousgrey commented on GitHub (Jan 25, 2022): PhotoPrism does not touch your originals directory in case you are using our index functionality (https://docs.photoprism.app/user-guide/library/). So PhotoPrism does not re-sort your photos unless you decided to use the import functionality. The folders in the folder section (https://docs.photoprism.app/user-guide/organize/folders/) and in the originals section (https://docs.photoprism.app/user-guide/library/files/) display how your original files are sorted. In the calendar section photos are displayed in months based on the date that is read from their metadata (https://docs.photoprism.app/user-guide/organize/calendar/). Did I get you right: 1. You have a folder "May 2021" in your originals. 2. All photos that are in this folder in your originals location are from May 2021 2. You indexed your files. 3. In the calendar section all photos of this folder are all located in the correct month 3. On the details tab of the photos that are in this folder (https://docs.photoprism.app/user-guide/organize/edit/#open-edit-dialog) you see the correct date 5. But in the list view within the folder section you see a wrong date? And these dates do not match the dates on the details tab? 6. Or do you see different files in the folder within the folder section than in the folder within your originals?
Author
Owner

@jackch1 commented on GitHub (Jan 25, 2022):

Apologies, here is a test file and the screenshot of it showing in the wrong folder on Photoprism Originals.

All these photos were added via the import function @graciousgrey, I have not added files manually at all.

  • Started with empty library
  • Imported photos via Photoprism Imports folder (stored on a seperate drive)
  • Import started and moved all files to correct date folder on disk
  • Noticed Photoprism is not displaying the right files when browsing 'Library > Originals' folder on the web app.

Link to files shown in 'Files' view on Photoprism: Google Drive Link

Screenshots:

Screenshot_2

Screenshot_3

@jackch1 commented on GitHub (Jan 25, 2022): Apologies, here is a test file and the screenshot of it showing in the wrong folder on Photoprism Originals. All these photos were added via the import function @graciousgrey, I have not added files manually at all. - Started with empty library - Imported photos via Photoprism Imports folder (stored on a seperate drive) - Import started and moved all files to correct date folder on disk - Noticed Photoprism is not displaying the right files when browsing 'Library > Originals' folder on the web app. Link to files shown in 'Files' view on Photoprism: [Google Drive Link](https://drive.google.com/drive/folders/1vetNpyoAex_oe7RIz0j2TGODaxhOjboS?usp=sharing ) Screenshots: ![Screenshot_2](https://user-images.githubusercontent.com/43887297/150980024-fa0671f6-be2a-4043-8f04-8c8404485b13.jpg) ![Screenshot_3](https://user-images.githubusercontent.com/43887297/150980392-e5ec8c37-6d8f-493c-a66c-a49c0a0128b9.jpg)
Author
Owner

@lastzero commented on GitHub (Jan 25, 2022):

Could it be that the date is later changed based on the Google Photos JSON sidecar files, other sidecar files, or manual changes? That would explain "wrong" import folders. Files won't be moved a second time when imported. This is intended behavior.

@lastzero commented on GitHub (Jan 25, 2022): Could it be that the date is later changed based on the Google Photos JSON sidecar files, other sidecar files, or manual changes? That would explain "wrong" import folders. Files won't be moved a second time when imported. This is intended behavior.
Author
Owner

@lastzero commented on GitHub (Jan 25, 2022):

We uploaded (and immediately deleted) two of your test files to our demo. They are in the correct folder based on the metadata:

Date/Time Original              : 2019:01:02 19:04:20
Create Date                     : 2019:01:02 19:04:20

Screenshot 2022-01-25 at 14 12 16

What are we missing? Note that many sponsors are waiting for (paid) support too, so we can not spend hours on this, especially if it is not a bug. Please help us to easily reproduce the "bug", otherwise it has to wait.

@lastzero commented on GitHub (Jan 25, 2022): We uploaded (and immediately deleted) two of your test files to our demo. They are in the correct folder based on the metadata: ``` Date/Time Original : 2019:01:02 19:04:20 Create Date : 2019:01:02 19:04:20 ``` ![Screenshot 2022-01-25 at 14 12 16](https://user-images.githubusercontent.com/301686/150983212-40aa21f4-21dc-4992-baa3-c6b5fcd8f329.png) What are we missing? Note that many sponsors are waiting for (paid) support too, so we can not spend hours on this, especially if it is not a bug. Please help us to easily reproduce the "bug", otherwise it has to wait.
Author
Owner

@jackch1 commented on GitHub (Jan 25, 2022):

I understand this may have to wait yeah, no worries. I think it might be related to the video file (it's a live photo) as this was given the wrong date in its file name during import. The .jpg has the correct date in it's file name, the .mp4 does not.

The metadata in the video file has the correct 'date created' so I don't know why it has been recognised as 2021-05-03 in photoprism.

The video file is also in the google drive link if you would like to try adding the whole live photo.

@jackch1 commented on GitHub (Jan 25, 2022): I understand this may have to wait yeah, no worries. I think it might be related to the video file (it's a live photo) as this was given the wrong date in its file name during import. The .jpg has the correct date in it's file name, the .mp4 does not. The metadata in the video file has the correct 'date created' so I don't know why it has been recognised as 2021-05-03 in photoprism. The video file is also in the google drive link if you would like to try adding the whole live photo.
Author
Owner

@lastzero commented on GitHub (Jan 25, 2022):

Maybe the JSON sidecar for the video has a wrong date?

@lastzero commented on GitHub (Jan 25, 2022): Maybe the JSON sidecar for the video has a wrong date?
Author
Owner

@lastzero commented on GitHub (Jan 25, 2022):

Also note we have a zero bug policy, it means bugs come first and should not wait. That's why we are so strict about what counts as a bug report and what is a technical support issue.

@lastzero commented on GitHub (Jan 25, 2022): Also note we have a zero bug policy, it means bugs come first and should not wait. That's why we are so strict about what counts as a bug report and what is a technical support issue.
Author
Owner

@jackch1 commented on GitHub (Jan 25, 2022):

Not sure which sidecar is for the video, but they all have the correct date.
Have attached a screenshot of how it looks in Photoprism in case that helps.

Screenshot of Files View

@jackch1 commented on GitHub (Jan 25, 2022): Not sure which sidecar is for the video, but they all have the correct date. Have attached a screenshot of how it looks in Photoprism in case that helps. ![Screenshot of Files View](https://user-images.githubusercontent.com/43887297/150987263-16cc6f46-e018-42fc-ae1f-2a2d5b273f4f.png)
Author
Owner

@jackch1 commented on GitHub (Jan 25, 2022):

Both JSON files are the same. Correct dates in both.

Apologies you cannot recreate, I know little about programming so am unsure how to help easily.
I can of couse test and provide more info.

image

@jackch1 commented on GitHub (Jan 25, 2022): Both JSON files are the same. Correct dates in both. Apologies you cannot recreate, I know little about programming so am unsure how to help easily. I can of couse test and provide more info. ![image](https://user-images.githubusercontent.com/43887297/150987631-816bac2d-99e5-486d-b306-b95cd57300d2.png)
Author
Owner

@lastzero commented on GitHub (Jan 25, 2022):

A bug must be reproducible as we otherwise can't fix it. If this isn't possible (yet), it may be best to figure out the details in GitHub Discussions before opening a bug report.

@lastzero commented on GitHub (Jan 25, 2022): A bug must be reproducible as we otherwise can't fix it. If this isn't possible (yet), it may be best to figure out the details in GitHub Discussions before opening a bug report.
Author
Owner

@lastzero commented on GitHub (Jan 25, 2022):

Did you try uploading the video to our demo, for example? Does it happen there? Of course we can try and do all this on our own, but we already work 7 days a week and are literally at our physical limits. You can test on our demo without being a developer, it's not that complicated.

@lastzero commented on GitHub (Jan 25, 2022): Did you try uploading the video to our demo, for example? Does it happen there? Of course we can try and do all this on our own, but we already work 7 days a week and are literally at our physical limits. You can test on our demo without being a developer, it's not that complicated.
Author
Owner

@lastzero commented on GitHub (Jan 25, 2022):

It may also depend on the original filenames and directory structure before importing. While we could try to rename files and folders based on your screenshots, it would help a lot to get samples from your original Google Photos export before you imported them.

@lastzero commented on GitHub (Jan 25, 2022): It may also depend on the original filenames and directory structure before importing. While we could try to rename files and folders based on your screenshots, it would help a lot to get samples from your original Google Photos export before you imported them.
Author
Owner

@lastzero commented on GitHub (Jan 25, 2022):

The bug report template has been updated to make it clearer which files are required to process the issue:

  • You have to provide sample files and logs if it is an IMPORT, INDEXING, or METADATA issue, otherwise we will not be able to process your report
  • If it is an IMPORT issue, please also provide an archive with affected files before importing them so that it's possible to reproduce your issue
@lastzero commented on GitHub (Jan 25, 2022): The bug report template has been updated to make it clearer which files are required to process the issue: - You have to provide sample files and logs if it is an IMPORT, INDEXING, or METADATA issue, otherwise we will not be able to process your report - If it is an IMPORT issue, please also provide an archive with affected files before importing them so that it's possible to reproduce your issue
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/photoprism#1305
No description provided.